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 SkipVought 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
 
I played around a bit and came up with this:

this 2002.07.26 does not work

this 2002/07/26 does work

My suggestions is this

cdate(format("20020726", "@@@@/@@/@@"))


You would of course replace the "20020726" with your field name.
 
I posted this in your other message.

I would create a new field in your table called NewDate. Then I would create an Update Query and place this new field in the Field grid and Update it to:

Left([your field name],4) & "." & Mid([your field name],5,2) & "." & Right([your field name],2)

I don't like updating my fields and this is the reason I would create a new column to update.

cew657
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top