ParseDate()
Syntax
Date = ParseDate(Mask$, String$)Description
Transform a string date into a regular date value, to be used with other date functions. If the date is incorrect, then -1 is returned. This function is very useful to retrieve dates already saved (in a log file for example) and do some operations on them.
The Mask$ is a string which tells how the date is formatted. The Mask$ accepts several reserved tokens:%yyyy: Will be replaced by the year value, on 4 digits. %yy: Will be replaced by the year value, on 2 digits. %mm: Will be replaced by the month value, on 2 digits. %dd: Will be replaced by the day value, on 2 digits. %hh: Will be replaced by the hour value, on 2 digits. %ii: Will be replaced by the minute value, on 2 digits. %ss: Will be replaced by the second value, on 2 digits.Example:Debug ParseDate("%yy/%mm/%dd", "02/12/01") ; Return the date value of the "02/12/01"
Note: The 'String$' to be converted into a date value must contain at least one separator between its single components.
Supported OS
Windows, Linux, MacOS X