Posted on 19th April 2024
In SQL, we will use the DateDiff function to calculate the difference between two dates. But in Teradata, usage of “DataDiff” function can lead to error. So, instead of the DateDiff function, we will use ‘-’ operator to calculate the difference between two dates.
Example:
SELECT(DATE ‘2008-06-10’ - DATE ‘2008-05-28’ ) DAY;
STILL GOT QUERIES?