Hi All,
Can anyone please explain me the logic for this two formulas which was mentioned in screenshot, where as it is displaying the start quarter date and end quarter date, but i didnt understood the logic behind this formulas. please help me to understand this logic
Start of Qtr (new column created in formula tool)
DateTimeAdd((left(DateTimeToday(),5) + PadLeft(ToString(ceil(DateTimeMonth(DateTimeToday())/3) *3-2),2, '0') + '-01'), -3, 'months')
End of Qtr (new column created in formula tool)
DateTimeAdd(DateTimeTrim(left(DateTimeToday(),5) + PadLeft(ToString(ceil(DateTimeMonth(DateTimeToday())/3)*3),2, '0') + '-01', "lastofmonth"), -3, 'months')
result
Start of Qtr | End of Qtr |
01-07-2023 00:00 | 30-09-2023 23:59 |
01-07-2023 00:00 | 30-09-2023 23:59 |
01-07-2023 00:00 | 30-09-2023 23:59 |
01-07-2023 00:00 | 30-09-2023 23:59 |
Ive taken a go at this although this would need to be validated:
More general advice is for work like this one should start from the inner most brackets and break it down into component parts before working outwards to other parts of the formula
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |