I try to get a value from excel and to use in vb.bet but when i try to convert date from Excel my vba display error.
I try this:
Dim Target As DateTime = Nothing
Target = DateTime.ParseExact(currentWorksheet.Cells(CurrentRow, 19).Text, "dd-MMM-yy", System.Globalization.CultureInfo.InvariantCulture)
This code currentWorksheet.Cells(CurrentRow, 19).Text
get me 3939344687 value from Excel, my date in excel are 01/26/17.
When i try to convert this number to date i get error.
Another code what i try are :
Target = Convert.ToDateTime(currentWorksheet.Cells(CurrentRow, 19).Text)
But doesn't work.