Convert numbers to date in a query help

simon4amiee

Registered User.
Local time
Today, 12:17
Joined
Jan 3, 2007
Messages
109
Very simply, how do i convert 20130214number into 14/02/13 date.
 
Assuming that format is the same short date format set in Windows I would use Dateserial with a combination of mid right and left functions

Dateserial format is

Dateserial(year,month,day)

So
Dateserial(left(stringdate,4),mid(stringdate,5,2),right(stringdate,2))


Others prefer to use CDate along with those functions

Brian
 
I see that you only want a 2 digit year in which case you may have to use CDate

CDate(right(str,2) & "/" & mid(str,5,2) & "/" mid(str,3,2)

Brian
 

Users who are viewing this thread

Back
Top Bottom