17.10 - Quarter - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Date and Time Functions and Expressions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1211-171K
Language
English (United States)

The ISO year is divided into 4 quarters with 13 weeks per quarter. There are 14 weeks in the last quarter if the year has 53 weeks. Quarters are divided into 3 months with a pattern of 4,4,5 or 4,5,4 or 5,4,4 weeks. If the year has 53 weeks, the last quarter has 3 months with a pattern of 4,5,5 or 5,4,5 or 5,5,4 weeks. The quarter start or end is determined by applying the ISO Thursday rule to the week at the month border in the last month of the quarter. The week at the month border belongs to the month that has Thursday of that week. For example, Friday, January 1, 2016, is part of a week in which Thursday falls in the last week and last quarter of 2015. Therefore, Friday, January 1, 2016, belongs to last quarter of 2015 in the ISO calendar and the first quarter of 2016 in the Teradata calendar.

2015 Dec last week of quarter ISO

2016 Jan first week of quarter ISO