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

Conversion of Date

Status
Not open for further replies.

Luhrern

Technical User
Jul 26, 2002
6
0
0
NO
I have a database where dates is pesented by a 8 position text string i.e. 20020726. What kind (if any) of conversion function in Access can I use to convert this to a date i.e from 20020726 (8 position date format) to 2002.07.26 ?
Regards

Luhrern
 
?dateserial(int(left("20020726",4)),int(mid("20020726",5,2)),int(mid("20020726",7,2)))
7/26/2002
 
Sorry forgot to format

?format(dateserial(int(left("20020726",4)),int(mid("20020726",5,2)),int(mid("20020726",7,2))),"yyyy.mm.dd")
2002.07.26
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top