Skip to end of banner
Go to start of banner

parseDate

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Availability

This routine is available starting with katl-commons 2.5.10 / 2.6.2.

Syntax

parseDate(format, date_as_string)

Description

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

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

  • No labels