Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

import specifications

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am using Access 95........................

The date is not converting properly from the text file I am using.
Text file format: 2/13/01
After import : 2/13/1901

It is still inserting 19**. What can I do to get the date to import properly from this text file? I need a four digit year.
 
Short of upgrading to a Y2K-compliant version of Access, maybe your best bet is to write a query to run against the table after you import.

It would be an update query, and the target table would be your imported table. You would update the date column by changing the century if the year is less than, say, 1905.

Let's say your date column is called ImpDate. In the Criteria: row, you would enter Year([ImpDate]) < 1905. In the Update to: row enter DateSerial(Year([ImpDate])+100, Month([ImpDate]), Day([ImpDate])). Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top