on 06-27-2016 6:00 AM
Hello,
I want to create formula on Quater end date in crystal reports.
Ex-1 Give input Date parameter -17-Feb-2016 then output must be- 31-Dec-2015
Ex-2 Give Input Date parameter - 15-Jun-2016 then output must be 31-March-2015.
Generally 1 St April- 31 June as 1 st Quater
1 July - 31 Aug as 2nd Quater
1 Sept - 31 Dec as 3rd Quater
1 Jan- 31 March as 4th Quater
Thanks Regards,
Ramesh.P
Hi Ramesh,
Try this :
If {?date} in date(Year({?date}),04,01) to date(year({?date}),06,30)
Then date(Year({?date}),03,31)
Else
If {?date} in date(Year({?date}),07,01) to date(year({?date}),09,30)
Then date(Year({?date}),06,30)
Else
If {?date} in date(Year({?date}),10,01) to date(year({?date}),12,31)
Then date(Year({?date}),09,30)
Else
If {?date} in date(Year({?date}),01,01) to date(year({?date}),03,31)
Then date(Year({?date})-1,12,31)
Note : replace {?date} with your parameter or date .
Thanks,
Sastry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramesh,
Could you please explain how 31-Dec-2015 is the last date of the quarter when the selected date is 17-Feb-2016?
Also, why does Q2 only have two months?
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
23 | |
11 | |
9 | |
9 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.