Date functions allow you to control dates in your data source.
For example, you would possibly have a date field with year, month, and day for every value (2004-04-15). From these existing values, you’ll create new date values with a date function, like the DATETRUNC function. for instance , you’ll find the date of the start of the quarter for any existing date value.
So, if the first date is ‘3/27/2011’, using the above calculation would return ‘1/1/2011’ to point that Q1 started on January 1. If the first date is ‘5/3/2011’, then the calculation would return ‘4/1/2011’ to point that Q2 started on April 1, four months into the year.
The ISO 8601 format is a world standard for calculating dates and times that differs from the Gregorian calendar thanks to how the starting week of a year (Week 1) is calculated. within the Gregorian calendar , the user can define on which day every week begins. within the ISO 8601 Standard, the week always begins on a Monday.
In a Gregorian calendar when a replacement year starts, Week 1 of the year is counted as starting on the first of January, no matter where within the weekday the first of January occurs. If January 1st falls on a Saturday, then Week 1 will have at some point in it and Week 2 will begin on the subsequent Sunday.
In the ISO 8601 format, Week 1 of a replacement year begins on a Monday and has four or more days in January. for instance , if January 1st falls on a Saturday, then Week 1 won’t begin until the subsequent Monday, January 3rd. Calculating dates this manner makes sure that there are a uniform number of days in Week 1 of a replacement year.