Hello David,
Internally above query are using timestamp function. For end user it does not matter what way one uses / calls the function, but using CAST('2010-01-01' AS TIMESTAMP) makes obvious sense.
------------------------------
Sachin Jain
APD Team Lead - Netezza and IIAS
------------------------------
Original Message:
Sent: Thu May 26, 2022 03:06 PM
From: David Briars
Subject: Displaying Date-Time Field.
All three of these SELECT's return the same value - 1/1/2010 12:00:00 AM.
SELECT DATETIME('2010-01-01') as start_date;
SELECT (DATETIME '2010-01-01') as start_date;
SELECT CAST('2010-01-01' AS TIMESTAMP) as start_date;
Is there any preference for one over the other two?
------------------------------
David Briars
------------------------------
#NetezzaPerformanceServer