Édition

Partage via


System.CreateDateTime(Date, Time) Method

Version: Available or changed with runtime version 1.0.

Creates a DateTime object from a date and a time.

Syntax

Datetime :=   System.CreateDateTime(Date: Date, Time: Time)

Note

This method can be invoked without specifying the data type name.

Parameters

Date
 Type: Date
The date that you want to use to create a DateTime. You cannot use an undefined date to create a DateTime.

Time
 Type: Time
The time that you want to use to create a DateTime. You cannot use an undefined time to create a DateTime.

Return Value

Datetime
 Type: DateTime

Example

var
    TestDate: Date;
    TestTime: Time;
    TestDateTime: DateTime;
begin
    TestDate := Today;  
    TestTime := Time;  
    TestDateTime := CreateDateTime(TestDate,TestTime);  
    …  
    TestDateTime := CreateDateTime(081111D,020000T);  
    …  
    TestDateTime := CreateDateTime(010101D,0T);  
end;

System Data Type
Get Started with AL
Developing Extensions