Hi,
I'm trying to convert 161017 to date 10/17/16 using VBA. I thought Cdate function would work but no luck. Thanks for help.
Please Login or Register to view this content.
Hi,
I'm trying to convert 161017 to date 10/17/16 using VBA. I thought Cdate function would work but no luck. Thanks for help.
Please Login or Register to view this content.
Hi,
first try ValueDate = CDate(Range("Data!A1").Value) …
If it fails, so the cell text does not respect your regional date format, just see CDate VBA inner help !
In this case, you can split text to form a valid date for CDate or DateSerial functions using Mid function (to see in VBA help) …
Hi biznet,
Try
See attached using this function above.Please Login or Register to view this content.
UDF to change YYMMDD number ToDate.xlsm
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
Thanks Marvin and Marc. Both of your solutions worked
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks