Forum Moderators: open

Message Too Old, No Replies

Inserting server date into access database

Sometimes its DD/MM/YY, others its MM/DD/YY

         

TheDave

7:41 am on Aug 4, 2003 (gmt 0)

10+ Year Member



When I insert a new record into the access database (via ADODB), and use the date() function to insert the current date, the date is inserted differently depending on the particular day. So when I sort the records, they are sorted all out of wack. It's really got me annoyed, has anyone encountered this, and found a simple, reliable solution?

Thanks :)

mattglet

1:42 pm on Aug 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



before you insert (i am assuming you are using VBScript), use the FormatDateTime() function. all of your dates will then be inserted with this format: MM/DD/YYYY. you can add the DateFormat parameter to further specify the mask. Hope this helps.

-Matt

TheDave

2:30 pm on Aug 4, 2003 (gmt 0)

10+ Year Member



Thanks, I will look into it. Sounds like its just what I need :)