Hi there,
I am calculating the current and previous regulatory start and end years dates. For instance, the regulatory year starts from first May of every year and ends on the last day of April next year. So for the current year regulatory year period would be from 1-05-2019 to 30-04-2020. For the previous year, it would be 1-05-2018 to 30-04-2019.
I am using following code to calculate the start and end of the year:
Current Year Start : @DateTimeFormat(@DateTimeAdd(@DateTimeNow(),-P8M),%B %Y)
Current Year End: @DateTimeFormat(@DateTimeAdd(@DateTimeNow(),P3M),%B %Y)
Previous Year Start: @DateTimeFormat(@DateTimeAdd(@DateTimeNow(),-P20M),%B %Y)
Previous Year End: @DateTimeFormat(@DateTimeAdd(@DateTimeNow(),-P9M),%B %Y)
With the above code, the day is missing. If I use %d, it starts the day with reference to the current day. I don't know how to get the end or start day of the calculated months. So I decided to concatenate the hardcoded day with the above calculated months.
The problem I am facing is not sure how to get or concatenate the day in the above-calculated fields of months and years. Any help would be really appreciated.