ccyymmdd to dd/mm/yyyy from query

A

Andy

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.
 
O

Ofer Cohen

Try

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

Andy

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.
 
Top