date format

D

DD

i have a table that is imported from excel. the date is list as 4062008 for
04/06/08. is there a way i can convert this to 20080406 or at best
04/06/2008.

any help is appreciated

thanks
 
D

Dale Fye

DD,

When I import from Excel, I generally import to a temp table that I have
already built. This way, I can force data into the datatypes I want. I
assume that it is coming in as a long integer, so after you import to the
table, I would then write a query that would append the data from the temp
table to my actual destination table. To format this date field, I would do
something like:

DateField: dateserial(Temp.DateField Mod 10000, temp.DateField\1000000,
(temp.DateField\10000) mod 100)

HTH
Dale
 
E

Evi

Format the import thus

RealDate: DateValue(Format([DateNum],"00\/00\/0000"))

and append RealDate to your table's date field

I wonder whose bright idea it was to enter it that way in Excel - it doesn't
even sort properly!

Evi
 

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