Using Date/Time Values

Let us look at a similar example, this time using date/time values.

Dim varTest
varTest = "5/16/99 12:30 PM"
MsgBox TypeName(varTest)

When we run this code in Windows Script Host, the variable assignment results in a subtype of String, although you might expect it to be Date. We get the String subtype because we put the date/time value in quotes. We saw this principle in action in another post when we put the number 12 in quotes in the variable assignment.

First
Next