ccyymmdd to dd/mm/yyyy from query

G

Guest

I have data coming from an ODBC connection which comes in as text format in
the format ccyymmdd. I need to convert this to dd/mm/yyyy with a format of
date/time in a table outputting from a make table query.

I can easily get the form dd/mm/yyyy with some concatenation, but want to
make this field with the format of date/time...

Help appreciated.
 
G

Guest

Try

NewDate:
DateSerial(Mid([FieldName],3,2),Mid([FieldName],5,2),Right([FieldName],2))
 
G

Guest

Long-winded, but hey it works!

Cheers

Ofer Cohen said:
Try

NewDate:
DateSerial(Mid([FieldName],3,2),Mid([FieldName],5,2),Right([FieldName],2))

--
Good Luck
BS"D


Andy said:
I have data coming from an ODBC connection which comes in as text format in
the format ccyymmdd. I need to convert this to dd/mm/yyyy with a format of
date/time in a table outputting from a make table query.

I can easily get the form dd/mm/yyyy with some concatenation, but want to
make this field with the format of date/time...

Help appreciated.
 

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