extract date from string

laffeg

Registered User.
Local time
Today, 21:28
Joined
Jun 3, 2008
Messages
40
hi
got a field that is a long string of information with spaces to separate different bits of information that include a date in simple ddmmyy no slashes or dots
I'm using various left and instr functions to separate out the information into individual fields in a query
all working other than I can't get the date to show as a date

Expr5: Format$(Left([expr4],InStr([expr4],"-")-2),"dd/mm/yy")

example
161220 I want to have as date value 16/12/20 but instead I am getting 27/05/41 ??

what am I missing ?
thanks in advance for any help
 

Attachments

  • query.JPG
    query.JPG
    25.8 KB · Views: 177
excellent - gold star to you !
works a treat
many thanks
 
Not a correction Pat, just showing it was not even 2041 :)
 

Users who are viewing this thread

Back
Top Bottom