Cicode Programming Reference > Cicode Function Categories > Timestamp Functions | Cicode

Timestamp Functions

The Timestamp functions enable you to programmatically read and write the Timestamp values of tag elements and access the timestamp information associated with a tag value.

No function taking either Timestamp or Quality as an argument can be called from the Cicode Kernel Window or through a CtCicode CtAPI function.

The following functions are used to interface with the TIMESTAMP data type.

StrToTimestamp Converts timestamp in a STRING format into a TIMESTAMP format
TimestampAdd Adds time (in part of) to a TIMESTAMP variable.
TimestampCreate Returns a timestamp variable created from the parts.
TimestampToStr Converts a TIMESTAMP variable into a string.
TimestampDifference Returns a difference between two TIMESTAMP variables as a number of milliseconds.
TimestampCurrent Returns the current system date and time as a TIMESTAMP variable.
TimestampFormat Format a TIMESTAMP variable into a string.
TimestampGetPart Returns one part (year, month, day, etc) of the timestamp variable.
TimeIntToTimestamp Converts a time INTEGER which is represented as a number of seconds since 01/01/1970 to a TIMESTAMP
TimestampSub Subtracts time (in part of) from a TIMESTAMP variable.
TimestampToTimeInt Converts a TIMESTAMP variable into a time INTEGER which is represented as a number of seconds since 01/01/1970.
VariableTimestamp Extracts the timestamp from a given variable.

See Also

Published June 2018