Timestamp Rules
Timestamp
values are encoded in data table files using Khiops native format YYYY-MM-DD HH:MM:SS.
.
Other formats are available, that allow to convert categorical values to timestamp values:
<Date format> <Time format>
: A date format followed by a blank and a time format<Date format>-<Time format>
: A date format followed by a-
and a time format<Date format>_<Time format>
: A date format followed by an_
and a time format<Date format>T<Time format>
: A date format followed by aT
and a time format<Date format><Time format>
: A date format directly followed by a time format. Valid only in the case of date and time formats with not separator character (e.g.YYYYMMDDHHMMSS
).
Timestamp
rules return a missing value when their timestamp operand is not valid or when
a numerical operand is missing.
FormatTimestamp
Formats a timestamp into a categorical value using a timestamp format. Timestamp format is
a categorical constant value among the available timestamp formats (for example: YYYY-MM-DD
HH:MM:SS
).
AsTimestamp
Recodes a categorical value into a timestamp value using a timestamp format.
Example
GetDate
Date in a timestamp value.
GetTime
Time in a timestamp value.
DecimalYearTS
Year in a timestamp value, with decimal part for day in year, at a timestamp precision.
AbsoluteSecond
Total elapsed seconds since 2000-01-01 00:00:00
.
DecimalWeekDay
Week day of the date of the timestamp value, plus decimal day of the time.
Precisely, DecimalWeekDay := WeekDay(date) + DecimalTime(time)/24
.
DiffTimestamp
Difference in seconds between two timestamp values.
AddSeconds
Adds a number of seconds to a timestamp value.
IsTimestampValid
Checks if a timestamp value is valid.
BuildTimestamp
Builds a timestamp from a date and time values.