Reversing Dates on First Insert in DataEnvironment and VB6
From: taoiseachjoe (taoiseachjoe_at_discussions.microsoft.com)
Date: 11/04/04
- Next message: red floyd: "Re: dll project generates fully .lib"
- Previous message: Liviu Andron: "Re: dll project generates fully .lib"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 4 Nov 2004 11:54:04 -0800
I am using a Command to INSERT a single row INTO an Access table. The
Date/Time fields are causing me grief by reversing the Day and Month - but
only on SOME rows.
On the FIRST Insert the date is Correct, but on subsequent Inserts the date
is reversed.
Here is my table after 4 inserts:
AppID AppStartDate AppEndDate
90 04/11/2004 12:15:00 04/11/2004 13:15:00
91 11/04/2004 12:15:00 11/04/2004 13:15:00
92 11/04/2004 12:15:00 11/04/2004 13:15:00
93 11/04/2004 12:15:00 11/04/2004 13:15:00
Here is the code which produces it:
Private Sub Command1_Click()
Dim dtStart As Date
Dim dtEnd As Date
dtStart = #11/4/2004 12:15:00 PM#
dtEnd = #11/4/2004 1:15:00 PM#
de.dbo_PutAppointment dtStart, dtEnd
End Sub
The dbo_PutAppointment command text in DataEnvironment is:
INSERT INTO Appointments (AppStartDate,AppEndDate) VALUES(?,?)
My Windows XP machine is set up for the UK Region - the data format is
dd/mm/yyyy
This is driving me crazy. Is it a bug or am I doing something wrong?
-- Joe Murray
- Next message: red floyd: "Re: dll project generates fully .lib"
- Previous message: Liviu Andron: "Re: dll project generates fully .lib"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|