Xbasic
SCANTIME Function
Syntax
Date_Time_Value as T = SCANTIME(C time_str,C Format[,T oldtime])
Arguments
- time_str
A properly formatted date/time value as specified by Time Format Codes and Year, Month, Day, and Week Format Codes. Character
- Format
A date/time format as specified by Time Format Codes and Date Format Codes. Character
- oldtime
Type
Description
Converts time string to time - uses format to parse the time - optional third parameter is old time to get non-specified values from.
Discussion
SCANTIME() returns a Time variable, by parsing the date time value specified by Formatted_Date_Time according to the format specified by Format_String. Refer to Time Format Codes.
Example
time("dd/MM/yyyy") -> "26/08/1999" scantime("26/08/1999", "dd/MM/yy") -> 08/26/199912:00:00 00 am time("X of Month yyyy") -> "Twenty Sixth of August 1999" scantime("Twenty Sixth of August 1999", "X of Month yyyy") -> 08/26/199912:00:00 00 am TimeVal = scantime("26/08/1999", "dd/MM/yy") typeof(TimeVal) -> "T"
See Also