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
- year as Number — Four-digit year.
- month as Number — Month (1-12).
- day as Number — Day (1-31).
- hour as Number — Hour (0-23).
- minute as Number — Minute (0-59).
- second as Number — Second (0-59).
- millisecond as Number — Millisecond (0-999).
Return value
DateTime — A new
DateTime.
Example
Code
dim x = DateTimeFromParts(2021, 3, 12, 4, 30, 0, 0)
print x
Output