...
Info | ||
---|---|---|
| ||
This routine is available since starting with katl-commons 2.5.10 / 2.6.2. |
Syntax
...
parseDate(format, date_as_string)
Description
...
Excerpt |
---|
Returns the parsed date, according to the format you provided; if parse fails, it will return a null date |
Parameters
...
Parameter name | Type | Required | Description |
---|---|---|---|
format | string | Yes | A valid Java format, as defined here: http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html |
date_as_string | string | Yes | The string which represents the date |
Return type
...
date
Example
...
Code Block |
---|
print("(1) Parsed date is:" + parseDate("yyyy.MM.dd", "2000.01.01")); //returns a valid date print("(2) Parsed date is:" + parseDate("yyyy.MM.dd", "2000/01/01")); //returns an empty date (null) |
See
...
also
Filter by label (Content by label) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|