How to show imported field as date format DD-MMM-YY


T

ttp

I am importing an Excel file which contains a field with dates of the
following format: DD-MMM-YY (15-Jul-08). The table is imported as a text
field and the data is not displayed as shown in the table. For instance,
15-Jul-08 is showing as 39644.276782 and 08-Jul-08 is showing as
39637.275718 and 25-Feb-8 is showing as 39503. How do I convert the data
imported to depict the date format of the original file (DD-MM-YY)?
 
Ad

Advertisements

T

ttp

I failed to mention that 15-Jul-08 and 08-Jul-08 also includes a time; but
25-Feb-08 does not include a time.
 
Ad

Advertisements

D

Douglas J. Steele

All you need to do is format the field as a date.

Under the covers, Date values are stored as eight-byte floating point number
where the integer portion represents the date as the number of days relative
to 30 Dec, 1899, and the decimal portion represents the time as a fraction
of a day.

?Format(39644.276782, "dd-mmm-yy")
15-Jul-08
?Format(39637.275718, "dd-mmm-yy")
08-Jul-08
?Format(39503, "dd-mmm-yy")
25-Feb-08
?CDate(39644.276782)
2008-07-15 06:38:34
?CDate(39637.275718)
2008-07-08 06:37:02
?CDate(39503)
2008-02-25
 

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