I am trying to return a date of March 1 of the next year unless today is earlier in the year than March15.
So if today is 09/01/2022 then I would return 03/01/2023.
If today is 02/01/2023 then I would also return 03/01/2023
That means I can’t just increment the year by one year in all cases.
I extracted the current month and current year in previous steps, then tried this spreadsheet formula:
if(<current month> >= 3, "03/15/" & <current year> + 1, "03/15/" & <current year>)
The problem is, the formula blows up when concatenating a string and a number, and there seems to be no function to cast a number to a string (and it won’t do it automatically).
And since spreadsheet formulas have no date functions, there seems to be no reasonable way to combine simple logic and date transformations.
- Is there some simpler way of approaching this (without code)?
- Is there some way in a spreadsheet formula to combine a string and a number?
- Why didn’t they include any date functions in the spreadsheet formula!!!!!!
I may end up writing some code for this, but for maintainability when I leave this project I prefer to keep it all in native actions if possible.
Best answer by GetUWiredView original