tags:

views:

23

answers:

2

How do i convert date in Netezza to yyyymmdd from timestamp format

A: 

This is a duplicate, please see StackOverFlow Answer

coffeepac
A: 

Hi Ntiyiso,

Use the below queries to convert to date format.

select TO_CHAR( DATE '2009-12-23 23:45:58','YYYY-MM-DD')

OR

select TO_CHAR(TO_DATE( '2009-12-23 23:45:58','YYYY-MM-DD HH24:MI:SS'),'YYYY-MM-DD')

OR

select TO_CHAR(current_timestamp,'YYYY-MM-DD')

Thanks, Sudhagar