lynnsong986
Board Regular
- Joined
- May 24, 2014
- Messages
- 146
Hello,
I'm trying to get this to work...
I have a string 20180115 and I need to convert it to Jan 15, 2018 (just to convert it to a date, doesn't matter what format of date).
this is what I have and it didn't work.
Function ConvertToDateRBC(Text As String) As Date
ConvertToDateRBC = Format(Application.WorksheetFunction.Date((Left(Text, 4)), (Mid(Text, 5, 2)), (Right(Text, 2))), "Short Date")
End Function
can someone please help?
thanks so much,
Lynn
I'm trying to get this to work...
I have a string 20180115 and I need to convert it to Jan 15, 2018 (just to convert it to a date, doesn't matter what format of date).
this is what I have and it didn't work.
Function ConvertToDateRBC(Text As String) As Date
ConvertToDateRBC = Format(Application.WorksheetFunction.Date((Left(Text, 4)), (Mid(Text, 5, 2)), (Right(Text, 2))), "Short Date")
End Function
can someone please help?
thanks so much,
Lynn
Last edited: