Hello.
I am working with a form that includes a date field. A user can use the drop down to select a date. I intend to use the choice and show custom output to the user.
For example: If the user chooses the date 4th May 2025, the message shown should be “Your Tax year is 4th May 2025 - 31st March 2026” or if 1st Feb 2024 is chosen, the message shown should be “Your Tax year is 1st Feb 2024 - 31st March 2024”.
The idea is to identify the immediately succeeding March and report this period to the user.
How to execute this. Can we extract the year from the choice and do some background math?
I’ve tried using the “Math” option in creating a new column but unable to move forward from there.
You can go down the math route, which can get a little complicated but definitely doable, but tell me more about your choice component. Do you have a table that is just a list of dates? Do you populate the each date manually? If so, you could add a second end date column in that same table. That way your choice component could write the start date to the table, and then you can create a relation/lookup to retrieve the end date. That’s the easy way if you are already populating that table yourself.
2 Likes
If you are still looking for a purely math solution, put this in a math column and pass your date into it.
((Date-DAY(Date)+15)+TRUNC(
(3-MONTH(Date)+1+
12*MAX(0,SIGN(3-MONTH(Date))*-1))
/12*365.2424))
-
DAY((Date-DAY(Date)+15)+TRUNC(
(3-MONTH(Date)+1+
12*MAX(0,SIGN(3-MONTH(Date))*-1))
/12*365.2424))
1 Like