%Library.PosixTime
datatype class %Library.PosixTime
ODBC Type: TIMESTAMP
The %PosixTime data type class represents a time stamp value.The logical value of the %PosixTime data type is based on the number of seconds since (or before) January 1, 1970 00:00:00. The logical values will never collide with those of %Date in a valid range, and will sort chronologically when stored in globals. %PosixTime takes up less disk space and memory than %TimeStamp datatype, and is better for performance than %TimeStamp.
The earliest date supported by %PosixTime is 0001-01-01 00:00:00, which has a logical value of -6979664624441081856. The last date supported is 9999-12-31 23:59:59.999999, which has a logical value of 1406323805406846975. Dates prior to 1970-01-01 00:00:00 have a negative logical value. %PosixTime values have a 1 microsecond resolution.
- To convert between %PosixTime and %TimeStamp format, call LogicalToTimeStamp()(posixtime_value)
- To convert between %TimeStamp and %PosixTime format, call TimeStampToLogical()(timestamp_value)
- To convert between %PosixTime and %Date format, call LogicalToDate()(posixtime_value).
- To convert between %Date and %PosixTime format, call DateToLogical()(date_value). A time of 00:00:00 is used.
- To convert between %PosixTime and %Time format, call LogicalToTime()(posixtime_value).
- To convert between %Time and %PosixTime format, call TimeToLogical()(time_value). The current date is used.
- To determine if a value is a valid logical %PosixTime value, call IsValid()(posixtime_value).
- To get the current, local datetime %PosixTime logical value, call CurrentTimeStamp()(precision).
- To get the current, UTC datetime %PosixTime logical value, call CurrentUTCTimeStamp()(precision).
- To get a Unix Timestamp value from a %PosixTime logical (local time) value, call LogicalToUnixTime()(posixtime_value).
- To get a %PosixTime logical value from a Unix Timestamp value, call UnixTimeToLogical()(unix_timestamp_value).
- To convert between %TimeStamp and %PosixTime format, call TimeStampToLogical()(timestamp_value)
Method Inventory
- CurrentTimeStamp()
- CurrentUTCTimeStamp()
- DateToLogical()
- DisplayToLogical()
- IsValid()
- JSONToLogical()
- LogicalToDate()
- LogicalToDisplay()
- LogicalToJSON()
- LogicalToOdbc()
- LogicalToTime()
- LogicalToTimeStamp()
- LogicalToUnixTime()
- LogicalToXSD()
- Normalize()
- OdbcToLogical()
- TimeStampToLogical()
- TimeToLogical()
- UnixTimeToLogical()
- XSDToLogical()
Parameters
$ZDATETIME
and $ZDATETIMEH
function's fformat value,
which is used to perform the formatting of the time component of the timestamp value.$ZDATETIME
and $ZDATETIMEH
function's tformat value,
which is used to perform the formatting of the time component of the timestamp value.Methods
Returns the logical %PosixTime value of the ODBC Timestamp string %val.