Posted on 26th July 2024| views
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;