16.20 - Calculating the Difference Between Two DateTime Values - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ SQL Date and Time Functions and Expressions

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
pxz1544241488545.ditamap
dita:ditavalPath
pxz1544241488545.ditaval
dita:id
pxz1544241488545

Teradata Database calculates the interval difference between two DATE, TIME or TIMESTAMP values according to the ANSI SQL standard. Units smaller than the unit of the result are ignored when calculating the interval value.

For example, when computing the difference in months for two DATE values, the day values in each of the two operands are ignored. Similarly when computing the difference in hours for two TIMESTAMP values, the minutes and the seconds values of the operands are ignored.