Format of text date

M

Mitch

I have an text import file with the date in the following format: yyyymmdd.
I need to move the year to the end so that it would look like mmddyyyy. I
have to leave this as a text field since I will be exporting the table to a
fixed width file. Any help would be appreciated.

Mitch
 
M

Mitch

Douglas,

This prompts for a date. I have over 300 that have to be converted. Is
there a way to just move the year to the end of the date?

Douglas J. Steele said:
Format(CDate(Format([TextDate], "####-##-##")), "mmddyyyy")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Mitch said:
I have an text import file with the date in the following format: yyyymmdd.
I need to move the year to the end so that it would look like mmddyyyy. I
have to leave this as a text field since I will be exporting the table to
a
fixed width file. Any help would be appreciated.

Mitch
 
D

Douglas J. Steele

That was a generic answer. You need to replace [TextDate] with your actual
field name.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Mitch said:
Douglas,

This prompts for a date. I have over 300 that have to be converted. Is
there a way to just move the year to the end of the date?

Douglas J. Steele said:
Format(CDate(Format([TextDate], "####-##-##")), "mmddyyyy")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Mitch said:
I have an text import file with the date in the following format:
yyyymmdd.
I need to move the year to the end so that it would look like mmddyyyy.
I
have to leave this as a text field since I will be exporting the table
to
a
fixed width file. Any help would be appreciated.

Mitch
 
K

Klatuu

Using what? a query.
Where are you importing the text file to?
--
Dave Hargis, Microsoft Access MVP


Mitch said:
Douglas,

This prompts for a date. I have over 300 that have to be converted. Is
there a way to just move the year to the end of the date?

Douglas J. Steele said:
Format(CDate(Format([TextDate], "####-##-##")), "mmddyyyy")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Mitch said:
I have an text import file with the date in the following format: yyyymmdd.
I need to move the year to the end so that it would look like mmddyyyy. I
have to leave this as a text field since I will be exporting the table to
a
fixed width file. Any help would be appreciated.

Mitch
 

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

Top