|
-
April 1st, 2011, 10:07 PM
#1
Inserting a date into MS Jet Database
Hi everyone:
I'm getting conflicting results from my search, so I'd appreciate if someone can clear this out for me. I need to insert a date & time value from COleDateTime variable into a Microsoft Jet Database. I use the following SQL query for that:
Code:
INSERT INTO `table name` (`date field name`) VALUES ('#yyyy-mm-dd hh:mm:ss#')
I can't seem to find a consensus whether it should be dash or a slash, or whether it should start with a year or a month? I obviously want to code this independent of a user's locale.
And second question, say if COleDateTime is not valid, how do I form the SQL date in that case?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|