![]() ![]() Month = CLng(Left(InputString, InStr(1, InputString, "/", vbTextCompare) - 1))ĭay = CLng(Mid(InputString, InStr(1, InputString, "/", vbTextCompare) + 1, InStrRev(InputString, "/",, vbTextCompare) - InStr(1, InputString, "/", vbTextCompare) - 1)) This is is the way I approached the problem: Sub MainTest()ĭim InputString As String, OutputDate As Dateĭebug.Print OutputDate, TypeName(OutputDate)įunction ConDate(ByRef InputString As String) As Dateĭim Day As Long, Month As Long, year As Long ![]() ![]() I didn't post this originally, because I felt it didn't address the root of the problem, however, if you want a workaround, you can use the below function in a similar way as you would use a CDate, by calling ConDate(""). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |