PDA

View Full Version : weird date system?


reubenb
09-17-2006, 03:10 AM
hi,
someone gave me a script, and it enters a number into the database for a date...


38975 is 15 September 06
38976 is 16 September 06

And I know this by:

<%= day(objrs("dte")) & " "& monthname(month(objrs("dte"))) & " " & year(objrs("dte")) & " " & objrs("etime")%>

???how is that possible., what date system is that?
how can i add things to the database in like normal 15/09/06 form?

degsy
09-20-2006, 02:19 PM
It is using the 1900 Data System
http://support.microsoft.com/kb/180162/

You can add dates in any format you want. You need to setup the database field for the format you want.

The default Data/Time for Access is mm/dd/yyyy
Date() and Now() should work or you can construct your own format as others should work. e.g. mm-dd-yyyy

You can even use the Unix type timestamp
http://www.ilovejackdaniels.com/asp/vbscript-date-format-functions/