Skip to content

Latest commit

 

History

History
65 lines (52 loc) · 1.69 KB

system-createdatetime-method.md

File metadata and controls

65 lines (52 loc) · 1.69 KB
title description ms.author ms.date ms.topic author ms.reviewer
System.CreateDateTime(Date, Time) Method
Creates a DateTime object from a date and a time.
solsen
05/14/2024
reference
SusanneWindfeldPedersen
solsen

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;

See Also

System Data Type
Get Started with AL
Developing Extensions