Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

parseDate(format, date_as_string[, locale_as_string])

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue

Returns the parsed date according to the format you provided. If parse fails, it will return a null date.

Returns the parsed date according to the format you provided. If parse fails, it will return a null date.

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

format

String

Yes

Valid Java format, as defined here: http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html.

date_as_string

String

Yes

String which represents the date.

locale_as_string

String

No

Language tag which should be used to parse a date. It can be leveraged to parse dates like this: 5/???/18.This parameter accepts well-formed BCP 47 language tag. See this link for more details on possible values.

Return Type

Date

Example

Code Block
languagejs
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)
print("(3) Parsed date is:" + parseDate("dd/MMM/yy", "5/???/18", "ru-RU")); // returns a valid date which is parsed using ru-RU locale

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "date_routine" and space = currentSpace ( )
labelsarray_routines
We've encountered an issue exporting this macro. Please try exporting this page again later.