Date, time, and timestamp literals
Description
Date, time, and timestamp literals supported by Amazon Redshift.(Redshift SQL Language reference Date, Time, Timestamp Literals).
Sample Source Patterns
Input Code:
--invalid
SELECT
DATEADD(month, 1, 'January 8, 1999'),
DATEADD(month, 1, '2000-Jan-31'),
DATEADD(month, 1, 'Jan-31-2000'),
DATEADD(month, 1, '20000215'),
DATEADD(month, 1, '080215'),
DATEADD(month, 1, '2008.366'),
DATEADD(month, 1, 'now');
--valid
SELECT
DATEADD(month, 1, '1999-01-08'),
DATEADD(month, 1, '1/8/1999'),
DATEADD(month, 1, '01/02/00'),
DATEADD(month, 1, '31-Jan-2000');Output Code:
Know Issues
Some DATE, TIME, and TIMESTAMP formats may produce different results in Redshift compared to Snowflake.
Related EWIs
SSC-EWI-RS0007: Date literal is not supported in Snowflake.
Last updated
