Querying a text field to return as date/time

E

EA

I have a table that contains fields with date and time stamps but the format
of these fields are text. Does anyone know how I can leave these as text but
create a query that can read them as date/time value?

Thanks!
 
J

John Spencer

You can try converting them in the query with a calculation

IIF(IsDate([YourField]),CDate([YourField]),Null) as RealDateField

If you are sure that YourField always contains a valid string then you can
drop the test and use
CDate([YourField])
 
K

KARL DEWEY

In the design view change the field from the current name i.e. YourDateField
to be like this SomethingDate: CVDate([YourDateField]) and that should do
it.
 
Top