Determines if a datetime is in the AM.
IsAm = SRP_DateTime("IsAm", Datetime)
Returns
1 if the datetime is in the AM, 0 if it is in the PM.
Parameters
| Parameter | Description |
|---|---|
| Datetime | A datetime in OI internal format. (REQUIRED) |
Remarks
The "IsAm" service returns 1 if the datetime is in the AM or 0 if it is in the PM. If an OI datetime represents March 30, 1978 at 12:41:08pm, this service would return 0. If the given time not valid, 0 is returned. Therefore, it might be necessary to Validate the datetime if you want to ensure no false negatives.
Examples
// Is the current hour in the AM?
IsAm = SRP_DateTime("IsAm", Time())
// Is the the current hour in UTC in the AM?
IsAm = SRP_DateTime("IsAm", SRP_DateTime("Now", 1))
// Is this hard coded datetime in the AM?
Hour = SRP_DateTime("IsAm", -9519.67241898148)
// Is the string containing a datetime in the AM?
Datetime = SRP_DateTime("Parse", "Thursday, March 30, 1978 at 12:41:08pm", "DDD, MMMM D, YYYY at h:mm:sstt")
IsAm = SRP_DateTime("IsAm", Datetime)