Assign Multiple Variable with name Q1,Q2,Q3,Q4 Put Value With respect to the month date patterns or format you want like ( month-2 ) anything you want.
Apply If: DateTime.Now.ToString(“MMM”)=“January” Or DateTime.Now.ToString(“MMM”)=“Febuary” Or DateTime.Now.ToString(“MMM”)=“March” Or
Then
“Your Q1 Work here”
Else If DateTime.Now.ToString(“MMM”)=“April”
Or… Same Conditions As Above.
Then
“Q2 Work Here”
Apply if conditions for all the 4 months when you want to run the process.
for eg:
if todays date is Jan 22024, in if condition
assign firstdate = now.addmonths(-12).tostring(01/MM/yyyy)
lastdate = New datetime (now.Date.Year, now.Date.Month,1).AddDays (-1)(dd/MM/yyyy)
if todays date is Apr 2024, in if condition
assign firstdate = now.addmonths(-3).tostring(01/MM/yyyy)
lastdate = New datetime (now.Date.Year, now.Date.Month,1).AddDays (-1)(dd/MM/yyyy)