Serial Date

S

Sash

I need to convert a date field into the serial date. For example, I watn
12/2/2008, to become 39784. Any ideas?
 
J

John W. Vinson

I need to convert a date field into the serial date. For example, I watn
12/2/2008, to become 39784. Any ideas?

CLng([datefield]) will do the trick.
 
F

fredg

I need to convert a date field into the serial date. For example, I watn
12/2/2008, to become 39784. Any ideas?

What is a serial date?
You seem to want to convert a date to it's numerical value.

? Clng(#12/2/2008#)
39784

To go the other way, use:
?CDate(39784)
12/2/2008

Please note that no matter how you display the value, if it is a Date
datatype field Access will store the value as 39784.0, so perhaps you
really don't need to do anything.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top