I am working on converting a file from a payroll package to a Gl package and I need to convert the date from a MMDDYYYY format to YYYYMMDD. I know it's something simple, but I don't do alot in VBA. Thanks for any help.
If the field is a true DateTime field then nothing to do.
Otherwise you may try something like this:
newField = Right(oldField, 4) & Mid(oldField, 3, 2) & Left(oldField, 2)
Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Assuming you are looking at a text field and not a date field. If it is a date field then apply the appropriate formatting at the table/query/form/report level.
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.