DateTime.Compose

Syntax

Compose(

Year: Integer;

Month: Integer;

Day: Integer;

Hour: Integer;

Minute: Integer;

Second: Integer;

Millisecond: Integer): DateTime;

Parameters

Year. Initial year.

Month. Initial month.

Day. Initial day.

Hour. Initial hour.

Minute. Initial minute.

Second. Initial second.

Millisecond. Initial millisecond.

Description

The Compose method creates a date and time value 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 UserProc;
Var
    DT: DateTime;
Begin
    DT := DateTime.Compose(20041211420515);
End Sub UserProc;

After executing the example the "DT" variable contains the date 21.01.2004 and time 14:20:05.

See also:

DateTime