G
Guest
I have a column in a table that I imported from a text file that contains a
date in the format YYYYMMDD. How can I convert this date to MM/DD/YYYY
format?
date in the format YYYYMMDD. How can I convert this date to MM/DD/YYYY
format?
Ken Snell said:Add a new field to the table. Then run an update query to put the date into
that new field, using an expression to convert the text string to the date.
For example:
UPDATE Tablename
SET NewDateField =
DateSerial(Left([ImportedDate], 4), Mid([ImportedDate], 5, 2),
Right([ImportedDate], 2));
--
Ken Snell
<MS ACCESS MVP>
containsDaveK said:I have a column in a table that I imported from a text file thata
date in the format YYYYMMDD. How can I convert this date to MM/DD/YYYY
format?
Douglas J. Steele said:Another option is
UPDATE Tablename
SET NewDateField = CDate(Format([ImportedDate], "####\/##\/##")
--
Doug Steele, Microsoft Access MVP
(No private e-mails, please)
Ken Snell said:Add a new field to the table. Then run an update query to put the date into
that new field, using an expression to convert the text string to the date.
For example:
UPDATE Tablename
SET NewDateField =
DateSerial(Left([ImportedDate], 4), Mid([ImportedDate], 5, 2),
Right([ImportedDate], 2));
--
Ken Snell
<MS ACCESS MVP>
containsDaveK said:I have a column in a table that I imported from a text file thata
date in the format YYYYMMDD. How can I convert this date to MM/DD/YYYY
format?
Kris said:Hi,
I have a similar situation.
I have a date 12/08/2004 which needs to be appended to another table as a
text file as 20041208 , YYYYMMDD format.
Thanks in advance.
Douglas J. Steele said:Another option is
UPDATE Tablename
SET NewDateField = CDate(Format([ImportedDate], "####\/##\/##")
--
Doug Steele, Microsoft Access MVP
(No private e-mails, please)
Ken Snell said:Add a new field to the table. Then run an update query to put the date into
that new field, using an expression to convert the text string to the date.
For example:
UPDATE Tablename
SET NewDateField =
DateSerial(Left([ImportedDate], 4), Mid([ImportedDate], 5, 2),
Right([ImportedDate], 2));
--
Ken Snell
<MS ACCESS MVP>
I have a column in a table that I imported from a text file that contains
a
date in the format YYYYMMDD. How can I convert this date to MM/DD/YYYY
format?
Kris said:Hi,
I have a similar situation.
I have a date 12/08/2004 which needs to be appended to another table as a
text file as 20041208 , YYYYMMDD format.
Thanks in advance.
Douglas J. Steele said:Another option is
UPDATE Tablename
SET NewDateField = CDate(Format([ImportedDate], "####\/##\/##")
--
Doug Steele, Microsoft Access MVP
(No private e-mails, please)
Ken Snell said:Add a new field to the table. Then run an update query to put the date into
that new field, using an expression to convert the text string to the date.
For example:
UPDATE Tablename
SET NewDateField =
DateSerial(Left([ImportedDate], 4), Mid([ImportedDate], 5, 2),
Right([ImportedDate], 2));
--
Ken Snell
<MS ACCESS MVP>
I have a column in a table that I imported from a text file that contains
a
date in the format YYYYMMDD. How can I convert this date to MM/DD/YYYY
format?
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.