Below are the keywords to get the date, time, or timestamp. These are reserved words that the system will deliver to you when requested.

Add or subtract a number from a date, and you are adding or subtracting days.

When subtracting between two dates, you get the approximate number of days between those dates.

The Smart Calendar works so well because it stores EVERY date in Teradata as something known as an INTEGERDATE. Teradata uses the formula above to store dates, but you will see normal date formats when querying.

Below are some examples of formatting the dates.

When you add or subtract from a Date, you add or subtract days. Notice we use the alias “Due Date” for the second column, but also use “Due Date” again for the fourth column’s calculation on Discount.

Below is the Add_Months Command. What you can do with it is add or subtract a month or many months to your date columns.  

Like the Add_Months, the EXTRACT Command is a Temporal or Time-Based Function.

The Extract Temporal Function can extract a portion of a date. As you can see, basic arithmetic accomplishes the same thing.

There is something known as a System Calendar (or, as Teradata calls it, Sys_Calendar.Calendar). Get ready for AWESOME! The System Calendar helps with the handling of advanced date logic.

Tera-Tom was born on a Saturday! It was the first full week of the month, the first full week of the year, and the first quarter!

Below is the perfect example of utilizing the system calendar to join any date field and expand your search options.