Change text format to date format

  • Thread starter Thread starter JLDLS
  • Start date Start date
J

JLDLS

I have an existing database in which the dates in a table have been entered
as text "01/01/2009", but I would like to run queries based upon date. Is
there a way to change the format of this column to date without losing the
text (converting the text to a date format). I have over 3000 records in the
database. Thanks.
 
I have an existing database in which the dates in a table have been entered
as text "01/01/2009", but I would like to run queries based upon date. Is
there a way to change the format of this column to date without losing the
text (converting the text to a date format). I have over 3000 records in the
database. Thanks.

Sure: CDate([textdate]) will convert it to a date/time field in accord with
the user's computer's Regional date/time format; i.e. if the regional date
setting is mm/dd/yyyy, American style, then a text string "08/10/2009" will be
seen as August 10; if the regional setting is the British dd/mm/yyyy the same
text string will be seen as October 8.
 
JLDLS said:
I have an existing database in which the dates
in a table have been entered as text "01/01/2009",
but I would like to run queries based upon date.
Is there a way to change the format of this column
to date without losing the text (converting the text
to a date format). I have over 3000 records in the
database. Thanks.

Add a date field, then use an update query to populate it with
CVDate([strDate]) where strDate is the field with the date as a text string.

Larry Linson
Microsoft Office Access MVP
 
Back
Top