toDate

Syntax

	toDate($calendar)

toDate($number)

Description

Converts the given parameter into a date value.

Parameter

Name Type Description Mandatory Default
calendar Business object A calendar with a date value. Depending on the calendar (system calendar or user calendar), the value is compatible with tl.core:Date or tl.core:DateTime. One of the two must be defined.
number Number Milliseconds since 1970-01-01:00:00.000. The inverse of this is toMillis().

Return value

Type: Business object

A date value representing the day of the calendar or the day of the milliseconds.

Examples

Note: The output may differ depending on the calendar's time zone.

Calendar as parameter

	toDate(date(2012, 5, 5))

Output: 05.06.2012

Number as parameter

	toDate(1338822000000)

Output: 05.06.2012