Vertica Date Function Support
TDV supports the date functions listed in the table below for Vertica.
With Vertica date functions, push results may differ from no-push results. For example:
| • | Although Vertica accepts TIMESTAMP as an argument for MONTHS_BETWEEN, it ignores the time part while calculating. TDV honors the time part while calculating. |
| • | DATEDIFF calculates results according to ticks (boundaries) crossed within a date or time range (counting the enddate but not the startdate). For years, the boundary is January 1. Months are based on calendar months, not the days within months. Weeks start at midnight on Sunday. Days are based on calendar days, not the hours within days, and so on. |
|
Vertica Date Function |
Notes |
|||||||||||||||||||||||||||
|
ADD_MONTHS |
|
|||||||||||||||||||||||||||
|
AT TIME ZONE |
|
|||||||||||||||||||||||||||
|
CLOCK_TIMESTAMP |
|
|||||||||||||||||||||||||||
|
CURRENT_DATE |
|
|||||||||||||||||||||||||||
|
CURRENT_TIME |
|
|||||||||||||||||||||||||||
|
CURRENT_TIMESTAMP |
|
|||||||||||||||||||||||||||
|
DATEDIFF |
|
|||||||||||||||||||||||||||
|
DATE_PART |
|
|||||||||||||||||||||||||||
|
DATE_TRUNC |
|
|||||||||||||||||||||||||||
|
DAY |
|
|||||||||||||||||||||||||||
|
DAYOFMONTH |
|
|||||||||||||||||||||||||||
|
DAYOFWEEK |
|
|||||||||||||||||||||||||||
|
DAYOFWEEK_ISO |
|
|||||||||||||||||||||||||||
|
DAYOFYEAR |
|
|||||||||||||||||||||||||||
|
DAYS |
|
|||||||||||||||||||||||||||
|
EXTRACT |
. |
|||||||||||||||||||||||||||
|
GETDATE |
Not supported. Use SYSDATE (identical). |
|||||||||||||||||||||||||||
|
GETUTCDATE |
|
|||||||||||||||||||||||||||
|
HOUR |
|
|||||||||||||||||||||||||||
|
ISFINITE |
|
|||||||||||||||||||||||||||
|
JULIAN_DAY |
|
|||||||||||||||||||||||||||
|
LAST_DAY |
|
|||||||||||||||||||||||||||
|
LOCALTIME |
|
|||||||||||||||||||||||||||
|
LOCALTIMESTAMP |
|
|||||||||||||||||||||||||||
|
MICROSECOND |
|
|||||||||||||||||||||||||||
|
MIDNIGHT_SECONDS |
|
|||||||||||||||||||||||||||
|
MINUTE |
|
|||||||||||||||||||||||||||
|
MONTH |
|
|||||||||||||||||||||||||||
|
MONTHS_BETWEEN |
Because |
|||||||||||||||||||||||||||
|
NEW_TIME |
Vertica 6.1 only. |
|||||||||||||||||||||||||||
|
NEXT_DAY |
|
|||||||||||||||||||||||||||
|
NOW |
|
|||||||||||||||||||||||||||
|
QUARTER |
|
|||||||||||||||||||||||||||
|
ROUND |
For date/time arguments. |
|||||||||||||||||||||||||||
|
SECOND |
|
|||||||||||||||||||||||||||
|
STATEMENT_TIMESTAMP |
|
|||||||||||||||||||||||||||
|
SYSDATE |
|
|||||||||||||||||||||||||||
|
TIMEOFDAY |
|
|||||||||||||||||||||||||||
|
TIMESTAMPADD |
Keywords that TDV requires in the TDV source code as the first argument (no quotation marks):
|
|||||||||||||||||||||||||||
|
TIMESTAMP_ROUND |
|
|||||||||||||||||||||||||||
|
TIMESTAMP_TRUNC |
|
|||||||||||||||||||||||||||
|
TIMESTAMPDIFF |
Keywords that TDV requires in the TDV source code as the first argument (no quotation marks):
|
|||||||||||||||||||||||||||
|
TRUNC |
|
|||||||||||||||||||||||||||
|
WEEK |
|
|||||||||||||||||||||||||||
|
WEEK_ISO |
|
|||||||||||||||||||||||||||
|
YEAR |
|
|||||||||||||||||||||||||||
|
YEAR_ISO |
|