Introduction
In this article, we will see how to get the current Quarter from Date from Canvas PowerApps.
Implementation Steps
1. Navigate to https://make.powerapps.com
2. Select Apps --> Select New App --> Select Canvas
3. Once Page opens input the name and select Tablet or Phone depending on your requirement, from my end I am selecting Tablet Mode
4. Once Page is opened --> Add a Label by selecting (Insert --> Label) and add a Button as well
5. Now select the Button and go to OnSelect and write below code logic
Code for converting Date to Quarter
If(
Month(Now())<=3,
Set(getQuarterFromDate,"1"),
Month(Now())>=04 && Month(Now())<=06,
Set(getQuarterFromDate,"2"),
Month(Now())>=07 && Month(Now())<=09,
Set(getQuarterFromDate,"3"),
Month(Now())>=10,
Set(getQuarterFromDate,"4")
)
6. Now set the default value to getQuarterFromDate
7. Now click on the Button
You will see the current Quarter value
Conclusion
By using the code which I have attached we can convert the current date to a Quarter.