Finance[ParseDate] - parse a string containing date information
|
Calling Sequence
|
|
ParseDate(date)
ParseDate(date, format)
|
|
Parameters
|
|
date
|
-
|
a string containing a date specification; date specification
|
format
|
-
|
deduce, default, or a string; (optional) date format
|
|
|
|
|
Description
|
|
•
|
The ParseDate command parses the string date assumed to contain date information according to the parsing specification given by the format string format. The date format can be any format specification as described in StringTools[ParseTime].
|
•
|
If the format string is missing, several standard date formats are tried. The first format to succeed will be used. The "standard" date formats are "%d-%b-%Y", "%d-%b-%y", "%d-%m-%Y", "%d-%m-%y", "%b-%d-%Y", and "%b-%d-%y".
|
•
|
The record returned by ParseDate contains slots with the following meanings and ranges of values:
|
monthDay
|
day of the month
|
1..31
|
month
|
month of the year
|
1..12
|
year
|
the year
|
0..9999
|
format
|
date format
|
deduce or string
|
|
|
|
|
Compatibility
|
|
•
|
The Finance[ParseDate] command was introduced in Maple 15.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
You can change the default file format by setting the _Env_FinanceDateFormat environment variable.
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
>
|
|
| (10) |
By default, the deduced date format will be used.
>
|
|
| (11) |
|
|
Download Help Document
Was this information helpful?