DAYS between DATES in Teradata

Number of days between two given dates:

You can get the days between the dates simply by the subtract operation ('-' - minus)
'DATE' operator must be there before the input dates to get the proper output.

Syntax:
SELECT DATE 'date1' - DATE 'date2';

Example:
The below query will return the number of days between two dates.
SELECT DATE '2008-06-01' - DATE '2008-01-01';

Result: 152 


Note:
If you simply give the dates without DATE operator it will give the undesired output (difference in month*100)
SELECT '2008-06-01' -  '2008-01-01';

Result: 500 



..