Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Implement BigQuery's TIME_SUB, TIMESTAMP_SUB, and DATE_SUB functions. Each of these functions follows similar behavior, the primary difference being whether the specified interval is being subtracted from a TIME, TIMESTAMP, or DATE expression. Examples for each are provided below:
TIME_SUB: TIME_SUB(TIME '15:30:00', INTERVAL 10 MINUTE) would output '15:20:00'.
TIMESTAMP_SUB: TIMESTAMP_SUB(TIMESTAMP '2008-12-25 15:30:00, INTERVAL 1 HOUR) would output '2008-12-25 14:30:00'.
DATE_SUB: DATE_SUB(DATE '2008-12-25', INTERVAL 2 DAY) would output '2008-12-27'.
Attachments
Issue Links
- links to