Good day,
I have a SharePoint list with a Start date column and another column (Q) that captures the quarter. When a user selected a date from the calendar, It shows the Quarter that will then be stored in the Q Column of SP. In Power Apps, i added a form to show SP list information. In the form, When a user selects a date, then it should display the Quarter of the Year. I was able to this by using the below code in a label called (qt)
If(Month(dt) in [1,2,3],Date(Year(dt),3,31),If(Month(dt) in [4,5,6],Date(Year(dt),6,30),If(Month(dt) in [7,8,9],Date(Year(dt),9,30),Date(Year(dt),12,31))))
where dt (label) is the Start Date Column . My question is
1. I would like to show it in Text eg, Instead of 1/3/2023, it should be Quarter 1 or 1/6/2023, Quarter 2 etc. As depicted below
| SP List (This is what I get) | | SP List (This is what I want) | | | |
| Title | StartDate | Quarter | Title | StartDate | Quarter |
| A | 1/2/2023 | 31/3/2023 | A | 1/2/2023 | Q1 |
| B | 1/4/2023 | 30/6/2023 | B | 1/4/2023 | Q2 |
| C | 1/11/2023 | 31/12/2023 | C | 1/11/2023 | Q4 |
2. A user should not be able to select a date that is earlier than the start date in the form. eg, If Start Date is 2/20/2023, The user should not be able to select a from 2/19/2023 downwards.
Thanks.