Versions Compared

Key

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

...

Info
titleAvailability

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_stringstringYesThe 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)
showLabelsfalse
max100
showSpacefalse
cqllabel = "date_routines"
labelsdate_routines