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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈