Convert date serial to date?

G

Guest

I am importing a table from Excel, and I have several fields with dates in
them. The problem is that many of these fields also have text, and so in
order to preserve the data I have been importing them as calculated text
fields. The problem that I have been having is that when I convert a date
into text, it changes it into a date serial (i.e. changes 03/12/02 into
37327).

My question is how do you change the date back from a date serial (a text
string) to an actual date, or at least something that can be displayed in a
date format? I've tried formatting the text, and I've checked out the Date
functions in Access VBA, but they all seem to require something that's
already formatted as a date, and not a date serial.

Does anyone know how to do this? If anyone can offer any suggestions about
how to change a date serial to a date (or how to import mixed columns without
changing them to text) I'd love to hear them.

Thanks,

Chris
 
B

Brendan Reynolds

You need the CDate function ...

? cdate(37327)
12/03/2002

dd/mm/yyyy format here
 

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