Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
We need support for an INTERVAL datatype. This is a pretty wide feature-gap for anyone doing temporal processing with Phoenix. For example, Oracle Interval Literals, Postgres Interval Type.
In the mean time, arithmetic between DATE and TIME types with numeric values appears to work on units of days, so
> select current_date(), current_date() - 7; +---------------------------------+---------------------------------+ | DATE '2016-03-09 17:17:58.412' | DATE '2016-03-02 17:17:58.412' | +---------------------------------+---------------------------------+ | 2016-03-09 17:17:58.412 | 2016-03-02 17:17:58.412 | +---------------------------------+---------------------------------+
and
> select current_date(), current_date() - (4.0/24); +---------------------------------+---------------------------------+ | DATE '2016-03-09 17:18:19.221' | DATE '2016-03-09 13:18:19.221' | +---------------------------------+---------------------------------+ | 2016-03-09 17:18:19.221 | 2016-03-09 13:18:19.221 | +---------------------------------+---------------------------------+
Attachments
Issue Links
- relates to
-
PHOENIX-1662 Implement missing date/time built-in functions and operators
- Open