on 10-18-2016 3:08 PM
hi all,
can you please advise how to find the first day of previous month
Thanks
Krishna
First Day Of the Current Month : = RelativeDate(CurrentDate();-DayNumberOfMonth(CurrentDate())+1)
Last day of Previous month : = RelativeDate( [First day of current month];-1)
First day of Previous month : =RelativeDate( LastDayOfMonth( RelativeDate([last day of previous month];-45));+1)
/*****
Example : First day of current month -- 10/1/2016
last day of previous month -- 09/30/2016
relative date 09/30/2016 -45 days = 08/15/2016
last day of (08/15/2016) = 08/31/2016
relative date 08/31/2016+1 = 09/1/2016 First day of previous month
**/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all for you suggestions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try using:
=RelativeDate(CurrentDate();-(DayNumberOfMonth(CurrentDate())+DayNumberOfMonth(RelativeDate(CurrentDate();-DayNumberOfMonth(CurrentDate()))))+1)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if your BO version is BI 4.1 Sp06 and above then try this.
=RelativeDate(ToDate("01/"+FormatDate(CurrentDate();"MM/yyyy");"dd/MM/yyyy");-1;MonthPeriod)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oracle DB:
select to_char(trunc(trunc(sysdate, 'MM') - 1, 'MM'),'DD-MON-YYYY') "First Day of Last Month",
from dual
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.