Check-Can-Convert-to-Time
Command Description
Determine if a string can be converted to time data
Command Prototype
bRet = Time.IsDate(sText, sFormat)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
sText | True | string | "12:00:00 January 1st, 2020" | The string to be determined that whether it can be converted to time data |
sFormat | True | string | "yyyy.mm.dd.hh.mm.ss" | Format of the time text, '.' stands for any non-numeric character |
return
bRet,The variable used to save the output of the command.
Demo
Dim bRet
bRet = Time.IsDate("January 1, 2020 12:00:00", "yyyy.mm.dd.hh.mm.ss")
TracePrint(bRet)
/**
bRet = true
*/