Hi there,
I am trying to calculate the four date fields related to the start and end of the current and previous regulatory year based on the current date. The regulatory year starts from 1st of April and ends on 31 March of next year. So in this way current regulatory year starts from 1st April 2019 and ends on 31 March 2020. Here is my logic :
Current_regulatory_year_start: @DateTimeFormat(@DateTimeFormat(@DateTimeAdd(@DateTimeNow(),-P9M),%Y%m)01,%Y%m%d)
Current_regulatory_year_end: @DateTimeFormat(@DateTimeFormat(@DateTimeAdd(@DateTimeNow(),P2M),%Y%m)31,%Y%m%d)
Previous-regulatory_year_start: @DateTimeFormat(@DateTimeFormat(@DateTimeAdd(@DateTimeNow(),-P21M),%Y%m)01,%Y%m%d)
Previous_regulatory_year_end: @DateTimeFormat(@DateTimeFormat(@DateTimeAdd(@DateTimeNow(),-P10M),%Y%m)31,%Y%m%d)
However, it does not produce the desired result. Current_reulatory_year_end and previous_regulatory_year_end produce null value, whereas the other two do not produce the right date. Could you please guide me where am I making the mistake?