Archives of the TeradataForum
Message Posted: Thu, 20 Jul 2006 @ 09:29:16 GMT
Subj: | | Re: Most efficient way to add hours to a date field? |
|
From: | | Michael Larkins |
Vivek:
You cannot add hours to a date column. You can add days and months. If you want to add hours to anything it will need to be a time or a
timestamp data type. Not only does it need to be one of this data types, it has been my experience that it must also have WITH TIME ZONE as part
of the definition too.
Interval definition:
INTERVAL 'hh' HOUR or INTERVAL -'hhhh' HOUR(4)
INTERVAL 'hh:mi' HOUR to MINUTE
INTERVAL 'hh:mi:ss' HOUR to SECOND
Regards,
Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor
|