ParseDate(
     string:datetime,
     [string:format]
)
date or bool

Arguments

datetime

The date/time string to parse.

format

Optional. Date format specification.

Return value

The parsed date, or false if parsing failed.

Description

Parses a date/time string to a date value, with controllable formatting.

If the format argument is a string, it must be a valid date/time picture string (e.g. "dd/MM/yyyy"). Otherwise, format should be the sum of one or more of the following flag values:

1Use system locale format
2Use ISO 8601 format
4Short date format
8Long date format
16No date (time only)
32Short time format
64Long time format
128No time (date only)

If locale flags are not specified, the default is to use the current user's locale date/time format. If individual date/time flags are not specified, the function will identify the format type automatically. However this is less efficient so if you know the date/time format type it's better to specify them.