DateTimeFromParts Procedure

Creates a DateTime for the specified year, month, day, hour, minute, second, and millisecond.
Declaration
function DateTimeFromParts(
year as Number, month as Number, day as Number,
hour as Number, minute as Number, second as Number,
millisecond as Number
) as DateTime

Parameters

Return value

DateTime — A new DateTime.

Example

Code
dim x = DateTimeFromParts(2021, 3, 12, 4, 30, 0, 0)
print x
Output
2021-03-12 04:30:00.000