My intention is to know if the data that the user has entered, is date and that it is in the MySQL ( YYYY-MM-DD
) format. First I made a query with data type date to a table of Excel , but it turns out that when doing a test to see what the query was doing, I could notice that the date captured it with numerical values ...
Example: A date in my table is "08/16/2005" , but when I make the query, it returns a number ( 38580 in this case).
I do not understand, since it is clear that it is a date, and not a number. I know that in VB.NET we have the function IsDate
, or the Date.TryParse
... I have already tried to identify them by making a condition, but apparently it does not work. How then could I do to identify if a value is of date type?
If (Not Date.TryParse(valor(0), fecha)) Then
MsgBox(valor(0))
errores += 1
End If