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

ParameterDescription
YearA valid calendar year. (REQUIRED)
MonthA valid calendar month. (REQUIRED)
DayA valid day for the given month. (REQUIRED)
HourA valid hour. 0 - 23. (REQUIRED)
MinuteA valid minute. 0 - 59. (REQUIRED)
SecondA 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)
  • No labels