iso8601toomnis()

Function group Execute on client Platform(s)
Date and Time NO All

Syntax

iso8601toomnis(ciso8601,bneedtime,bHasTimeZone[,cerrtext])

Description

Converts an ISO8601 date/date-time string to Omnis date-time and returns result (in UTC if cISO8601 contains time zone). Returns NULL and cErrText if an error occurs.

The date string is in the form: YYYY-MM-DDTHH:MM:SS.FFFZ rounding FFF into the hundredths field appropriately. The representations in the date string are:

YYYY-MM-DD Date: Year, month, day
T Date time delimeter
HH:MM:SS.FFF Time: Hours, minutes, seconds, fractions of a second
Z UTC offset: Z means zero UTC offset, or add +/- offset

For more information about ISO8601 look up: https://en.wikipedia.org/wiki/ISO_8601

Note that for a RESTful service, you should always use time zones for input date time values, so you would always pass bHasTimeZone as kTrue to iso8601toomnis() if you are passing bNeedTime as kTrue.