Need code chg 20010301 to date 03/01/2001

S

Sandy

Hello

I have imported a table that has a text column for the date. The year, month and date aren't in the order I need them

I need to change to a date column and alter the date to read MM/DD/YYYY

Any help I can get will be greatly appreciated

Sandy
 
T

tina

are you importing a text file - .txt, .csv, etc? if so, there's a good
chance you can set up the import specification to do it for you.


Sandy said:
Hello:

I have imported a table that has a text column for the date. The year,
month and date aren't in the order I need them.
 
J

John Vinson

Hello:

I have imported a table that has a text column for the date. The year, month and date aren't in the order I need them.

I need to change to a date column and alter the date to read MM/DD/YYYY.

Any help I can get will be greatly appreciated!

Add a Date/Time field (with a different fieldname, of course) to the
table. Run an Update query updating this new field to

DateSerial(CInt(Left([txtdate], 4)), CInt(Mid([txtdate], 5, 2)),
CInt(Mid([txtdate], 7, 2)))
 

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