Concepts to Know : Tokens and Types : Scalar Token Types : Date, Time, and Interval Token Types
 
Share this page                  
Date, Time, and Interval Token Types
DataFlow provides three different token types which store date and time data. These correspond to similar datatypes used to store date and time data in SQL. Because they each behave differently, it is important to select the appropriate type when dealing with date/time data.
The date datatype stores date information only. A date value represents a specific day on the Gregorian calendar.
The time datatype stores time of day information only. A time value represents a specific time of day on a 24-hour clock, up to millisecond precision.
The timestamp datatype can provide both date and time information but stores a specific point in time. A given point in time may be labeled with different dates or times in different time zones. Therefore, when working with timestamps, it is necessary to provide a time zone for additional context. For example, 2013-01-01 03:00:00 GMT and 2012-12-31 21:00:00 CST represent the same point in time, but the date and time components are not the same.
DataFlow also provides two different interval token types that can store information about amounts of time. They correspond to the equivalent types that Java provides to store temporal amounts. Durations are used to measure amounts of time using time-based values, while periods use date-based values.