DateTime.ComposeDay

Syntax

ComposeDay(Year: Integer; Month: Integer; Day: Integer): DateTime;

Parameters

Year. Initial year.

Month. Initial month.

Day. Initial day.

Description

The ComposeDay method creates a value of date from the specified input parameters.

Comments

The specified date and time components must correspond to the available range that is set for the DateTime data type. If the date that is less than the available one is specified, the date, to which the current century is added, is automatically formed. If the date that is greater than the available one is specified, exception is thrown.

Example

Sub Main;

Var

DT: DateTime;

Begin

DT := DateTime.ComposeDay(2004, 1, 21);

End Sub Main;

After executing the example the "DT" variable will contain the date 21.01.2004.

See also:

DateTime