View Full Version : Convert number to date


dclap
05-07-2009, 02:27 PM
I want to convert a datetimestamp from another database to a date and have to add a default date. ie date = Default date + datetimestamp.
for example - 30/12/1899 + 38681.3669048394.
How do you do this using Access 2003?

gemma-the-husky
05-07-2009, 04:21 PM
you shouldn't need to do that - that number 38681.whatever looks like a normal access date - just format that number as a date and see what it looks like.

30/12/1899 is actually date value 0 in access

raskew
05-07-2009, 04:30 PM
Hi -

Try the CDate() Function, e.g.

? cdate(38681.3669048394)
11/25/2005 8:48:21 AM

HTH - Bob

Mike375
05-07-2009, 04:39 PM
If the number 38681.3669048394 is in a field called [abc] and a new field is made in a query

Exp1: CDate([abc])

Which gives 25/11/2005 8:48:21 AM

dclap
05-08-2009, 12:27 AM
Thanks to all the CDate func. works well!!. Most of the time its always a simple answer.