
1. Re: Calculating a Quarter of the Year from a date field
comment_1 Feb 10, 2010 1:30 AM (in response to Thewack)Try:
Ceiling ( Month ( YourDate ) / 3 )

2. Re: Calculating a Quarter of the Year from a date field
Thewack Feb 10, 2010 9:28 AM (in response to Thewack)Hey! There is nothing ClunkityClunk about that.
Thanks,
Jack sends

3. Re: Calculating a Quarter of the Year from a date field
SwissMac Dec 23, 2012 4:59 PM (in response to Thewack)If you want to know which quarter of the year a date falls in, why divide by 3? Why not 4? Sorry if it's really simple but I don't get it...

4. Re: Calculating a Quarter of the Year from a date field
delibebek Dec 27, 2012 9:32 AM (in response to Thewack)Why not divide by 4?
If you apply this to the months, 12 being December, you see that you get 3. Dividing the number of months by 4 tells us how many months are in a quarter, but we're trying to reduce the numbers to fit into the range of each quarter. For the first three months, the number should fall between 0 and 1, with the ceiling function taking it to 1. Dividing by three does that properly with each quarter.
For many purposes, the number of each quarter is defined by the fiscal year (OCT 1  SEP 30), so the simple solution doesn't satisfy. To account for the final three months of the year being the first quarter, I would add 3 to the month and use the modulo function to capture that as a remainder before dividing by 3:
Ceiling ( ( Mod ( Month ( YourDate )+3; 12 ) ) / 3 )