How do i convert date in Netezza to yyyymmdd from timestamp format
相关问题
- Drop if exists in netezza
- Netezza date function for current date - 16 days
- How do i convert date in Netezza to yyyymmdd from
- Execute SQL file with multiple statements separate
- netezza nzload similar function to isnumeric?
相关文章
- How do i convert date in Netezza to yyyymmdd from
- Execute SQL file with multiple statements separate
- netezza nzload similar function to isnumeric?
- Field Aliasing in queries, nzsql
- Netezza公司系统目录表constains外部表中的重复记录(Netezza system ca
- FOR循环Netezza公司的问题(FOR loop Netezza issue)
- How to find the parent record using self join in N
- Find column Value by dividing with sum of a column
Use the below queries to convert to date format.
or
or
Netezza has built-in function for this by simply using:
This will return just the date portion of the timetamp and much more useful than casting it to a string with "TO_CHAR()" because it will work in GROUP BY, HAVING, and with other netezza date functions. (Where as the TO_CHAR method will not)
Also, the DATE_TRUNC() function will pull a specific value out of Timestamp ('Day', 'Month, 'Year', etc..) but not more than one of these without multiple functions and concatenate.
DATE() is the perfect and simple answer to this and I am surprised to see so many misleading answers to this question on Stack. I see TO_DATE a lot, which is Oracle's function for this but will not work on Netezza.