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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

20030101 to 01/01/2003

Status
Not open for further replies.

priac

Technical User
Feb 8, 2002
47
US
How do I change a text date"20030101" to be a date "01/01/2003"
 
You may not know this, but there is an option in MS Access to directly import YYYYMMDD dates to a Date/Time value. Go to advanced import options, set the order to YYYYMMDD, and delete the delimiter. I think that does it.


Otherwise left([field],4) gets the year,
mid([field],5,2) gets the month, and
right([field],2) gets the day.

--
Find common answers using Google Groups:

Corrupt MDBs FAQ
 
You can create a query with the following as a selected field: "date:Right([issuedate],2)+"/"+Mid([issuedate],5,2)+"/"+Left([issuedate],4)" - where [issuedate] is the date you want converted. this will turn yyyymmdd into dd/mm/yyyy and make it fit into a date field (without the '/' charecters it assumes it is a number which it then converts into a date).

[pc]

Graham
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top