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

Converting integer to date

Status
Not open for further replies.

shanec

Technical User
Joined
Feb 22, 2003
Messages
6
Location
AU
I am using Access 2000 and have an integer from a file I have imported which is supposed to be a date, the integer is in the form of 20023002, how can I convert this into a date data field.
 
you can just build an expression like:
Mid([Table1]![Test],5,2) & "/" & Right([Table1]![Test],2) & "/" & Left([Table1]![Test],4)

Where Test is your imported integer field - make a new table with this calculated field to replace your existing table Rgds
Geoff

Vah! Denuone Latine loquebar? Me ineptum. Interdum modo elabitur
 
just use this and set the resulting field to Date type should do it, I think....

=mid([FieldName],5,2)& "/" & mid([FieldName],7,2) & "/" & mid([FieldName],1,4)
 
I'm obviously not quite quick enough to beat xlbo to the answer
 
s'ok - I log on about every hour or so 'cos I get bored and am trying to cut down on ciggy breaks. Plus, I have to get all my answers in quick - before Nikki / Rob / Dale etc wake up and steal all the 1st answers
"Damn you slow light for creating different times in different places - won't somebody think of the kids ??"
:-) :-) :-) Rgds
Geoff

Vah! Denuone Latine loquebar? Me ineptum. Interdum modo elabitur
 
aah I'm logging on about the same, helps keep you sharp on stuff you already know and I've learned a heck of a lot just reading through peoples solutions.
hasn't helped me cut down on the ciggys tho [pipe]
 
Thanks a lot for the help guys, will try this out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top