[AccessD] YYYYMMDD string to date

Gustav Brock Gustav at cactus.dk
Fri Aug 10 06:52:30 CDT 2007


Hi John

Parsing is about 5 times faster than using CDate(Format(...)):

    datDate = DateSerial(Left(strDate, 4), Mid(strDate, 5, 2), Right(strDate, 2))

/gustav

>>> jwcolby at colbyconsulting.com 10-08-2007 04:06 >>>
Is there a neat way to change a string date in YYYYMMDD format to a date?  I
can write a function to parse the pieces etc but wondered if there is just
something built in to Access that will do it.  Cdate() does not like it.

John W. Colby
Colby Consulting
www.ColbyConsulting.com 






More information about the AccessD mailing list