Use the RelativeDate() function and a start date
While I was watching this video I noticed in the comments:
Peut être remplacer le mot quartier par trimestre ….
It put a smile on my face. It shows the importance of language, making sure we understand each other.
Oui. Après cela veut dire la même chose : quarter = trimestre
L’outil est en anglais, il ne faut pas avoir peur de l’anglais ;)
As important as the language is, so is clarity in the formulas we develop. In this blog I suggest an alternative to what is shown in the video. Our starting points are:
- dates have properties like
month()andmonthName() - quarters are periods of 3 consecutive months and per company the starting date of a quarter can vary. Traditionally we use Q1 as Jan, Feb, March and so forth, but this is not a given rule for all companies. We thus need a logic that takes care of any specific start date.
We start with point two: the start date
Quarter logic
Even in a formula language we come across assumptions. The Weekday() function assumes the USA date logic and to get a weekday logic as used in Europe we need the alternative IsoWeekday() . The same for…
