asTime
- function
- The asDate() and asTime() functions (often called using the as date and as time operators) convert a value to a known date/time. These are slightly different from the date() and time() functions -- instead of using the standard formats, they will pick up the format to use from the text itself:
put date("mar 16, 1927") -- "03/16/27" (the same as before)
put asDate("mar 16, 1927") -- "Mar 16, 1927" (new behavior)
- One common use for the asTime function is to perform comparison of values as times.
if the time is later than "5:30 PM" as time then …