Converting Dates from a txt file

  • Thread starter Thread starter John Zellman
  • Start date Start date
J

John Zellman

I'm attmepting to convert a date/time field in a txt file
to access with a date only.

For example "2004/1/1 12:00AM" in the text file should
be "1/1/04" in Access.

Any suggestions?

Thanks
 
CDate("2004/1/1 12:00AM") should work just fine, regardless of what Short
Date format have been selected on the workstation.

If any of the date/time fields have a time other than 12:00AM and you want
the date only, try

DateValue(CDate("2004/1/1 12:00AM"))
 
Back
Top