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
 

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

Similar Threads

Date Formatting 1
Text to date format? 0
Date Format when Exporting 5
Stored date is not being recognised 1
Date Format Question Again 2
Format Date Help Needed 4
Converting Text to Date 1
Changing Date Format? 4

Back
Top