Creates a datetime from a given year, month, day, hour, minute, and second.
Datetime = SRP_DateTime("Encode", Year, Month, Day, Hour, Minute, Second)
Returns
An OI datetime.
Parameters
Parameter | Description |
---|---|
Year | A valid calendar year. (REQUIRED) |
Month | A valid calendar month. (REQUIRED) |
Day | A valid day for the given month. (REQUIRED) |
Hour | A valid hour. 0 - 23. (REQUIRED) |
Minute | A valid minute. 0 - 59. (REQUIRED) |
Second | A valid second. 0 - 59 (REQUIRED) |
Remarks
The "Encode" service converts the components of a calendar date and the components of a time into a datetime in OI's internal format. For example, if Year is 1978, Month is 3, Day is 30, Hour is 12, Minute is 41, and Second is 8, this service will return 3742.52856481481. If any of the parameters do not represent a valid calendar date or time, then "" is returned.
Examples
// Encode a date time Datetime = SRP_DateTime("Encode", 1941, 12, 8, 7, 51, 43)