It is a rare business scenario and data model that does not have something related to dates at its core. So much of the business world deals with dates. People work on certain dates and not others. Deadlines are due on specific days. Bonuses and key performance indicators are dependent upon what week, month, or quarter sales occur. This chapter is all about working with dates, weeks, months, quarters, and years.
This chapter comprises the following recipes:
- Using time intelligence
- Creating quarters
- Calculating leap years
- Determining day and working day numbers in a year
- Determining date of the day number of a year
- Finding week start and end dates
- Finding working days for weeks, months, quarters, and years
- Constructing a sequential week number
- Computing rolling weeks
- Replacing Excel's NETWORKDAYS function
- Working with date intervals
- Exploiting...