MasterRacker
New member
I have the following test code in an application:
This creates a new row in the BatchData table correctly except for an incorrect value in BatchData.BatchDate. If I put a breakpoint in and watch this execute, BatchDate will show the value 11/13/2007 however in the table it shows 12:00:36 AM. It's like a type conversion is going on except that BatchDate is a Date and BatchData.BatchDate is defined in the table as a Date/Time. Can someone explain what's going on? Thanks.
_____
Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]
Code:
Dim BatchDate As Date
...
BatchDate = Date
db.Execute "INSERT INTO BatchData (BatchDate,RecipeID) VALUES (" & BatchDate & "," & CLng(Me.RecipeID) & " )", dbFailOnError
...
This creates a new row in the BatchData table correctly except for an incorrect value in BatchData.BatchDate. If I put a breakpoint in and watch this execute, BatchDate will show the value 11/13/2007 however in the table it shows 12:00:36 AM. It's like a type conversion is going on except that BatchDate is a Date and BatchData.BatchDate is defined in the table as a Date/Time. Can someone explain what's going on? Thanks.
_____
Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]