Hello there!
I was going through forum and found the below post:Referred post
1. Create a workflow with two arguments,
outPrevQuarterStartDate and outPrevQuarterEndDate with datetime datatype
2. Get previous quarter date based on current date
datePrevQuarterDate = DateTime.Now.AddMonths(-3)
3. Find previous quarter number
intPrevQuarterNumber = Convert.ToInt16((datePrevQuarterDate.Month - 1)/3+1)
4. Find start date of prev quarter
*outPrevQuarterStartDate = new DateTime(datePrevQuarterDate.Year, (intPrevQuarterNumber-1)3+1,1)
5. Find end date of prev quarter
outPrevQuarterEndDate = outPrevQuarterStartDate.AddMonths(3).AddDays(-1)
But then, this isn’t giving me the actual result.
For example: Today’s date: 08th Dec 2022 then the QNo is coming as 4 and this isn’t correct.
Can you help me with this?
Thanks in advance!!