Type conversion functions (VBA) | Microsoft Learn
https://learn.microsoft.com/en-us/office/vba/language/concepts/getting-started/type-conversion-functions
In this articleSyntaxReturn typesRemarksCBool function exampleCByte function exampleCCur function exampleCDate function exampleCDbl function exampleCDec function examplefunction to convert a string to a In general, hard-coding dates and times as strings (as shown in this example) is not recommended. Use date literals and time literals, such as #2/12/1969# and #4:45:23 PM#, instead.Dim MyDate, MyShortDate, MyTime, MyShortTimeMyDate = "February 12, 1969" ' Define date.See more on learn.microsoft.comBoolean: A string containing True or False.Empty: A zero-length string (""). function to convert a string to a In general, hard-coding dates and times as strings (as shown in this example) is not recommended. Use date literals and time literals, such as #2/12/1969# and #4:45:23 PM#, instead. Dim MyDate, MyShortDate, MyTime, MyShortTimeMyDate = "February 12, 1969" ' Define date. Boolean: A string containing True or False. Empty: A zero-length string ("").
function to convert a string to a In general, hard-coding dates and times as strings (as shown in this example) is not recommended. Use date literals and time literals, such as #2/12/1969# and #4:45:23 PM#, instead.
Dim MyDate, MyShortDate, MyTime, MyShortTimeMyDate = "February 12, 1969" ' Define date.
Boolean: A string containing True or False.
Empty: A zero-length string ("").
DA: 11 PA: 26 MOZ Rank: 38