Date format

Syntax

	dateFormat($pattern)

Description

Constructs a date format with the given pattern for either parse() or format() calls.

See SimpleDateFormat.

Parameters

Name Type Description Mandatory Default
pattern String

The pattern in which to format. The following characters are possible:

  • y - year
  • M - month in year
  • d - day in month
  • for other symbols see SimpleDateFormat.
yes

Return value

Type: Business Object

A date format which can now be used for parse() or format() calls.

Examples

Format

	dateFormat("dd-MM-yy").format(date(2012, 11, 5))

Output: 05-12-2012

Parse

	dateFormat("dd-MM-yy").parse("04-12-12")

Output: 04.12.2012