Need code chg 20010301 to date 03/01/2001

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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)))
 
Back
Top