Could someone please show how I would convert a text string such as "20101021" to a date format and datatype such as 10/21/2010 ? I've been toying with some VB code but not successful. Thanks for any help.
I'm running into a snag. I'm getting a datatype mismatch. I looked up DateSerial() since I wasn't familiar with it. It said that DateSerial expects an integer. My "YourField" as Skip called it, is a text datatype. Would that be the problem? If so, how can I convert to integer?
The 20101021 is actually part of a table name like:
"20101021_All_Personnel" so I changed skip's statement slightly to:
YourRealDate = DateSerial(Left([YourField],4),Mid([YourField],5,2),Mid([YourField],7,2))
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.