Skip to Content
0
Mar 31, 2020 at 06:43 AM

How to get last month start and end date in IDT using formula

788 Views Last edit Mar 31, 2020 at 06:53 AM 2 rev

Hi All,

I am new to BO, and i got a requirement like when we open the report we need to see Last Month start date and Last month end date. I want this to be in universe level.

I created two parameters and checked the default values and then formula.

I have created the below formulas:-

Last Month start date:- RelativeDate(CurrentDate();-(DayNumberOfMonth(CurrentDate())+DayNumberOfMonth(RelativeDate(CurrentDate();-DayNumberOfMonth(CurrentDate()))))+1)

-- as per the formula i need to get 02/01/2020 but it is populating 01/31/2020, Please let me know whether my formula is correct or need to changes.

Last Month end date:- RelativeDate((RelativeDate(CurrentDate();0;MonthPeriod)); -(DayNumberOfMonth(CurrentDate()));DayPeriod).

-- You can see in this picture i am getting last 2dates for Feb Month. Even for 2019, feb also i am seeing same issue. But i am getting last date of previous month.

Now when i open the report i can see the start date and end date but for some months the date is restricted to 27th like example I can see start date as :- 02/01/2020 and end date :- 02/29/2020 but when i click on calendar i am not seeing the dates like 28th feb and 29th feb. Please have a look on the screenshot.

Its little urgent plz some one help me.

I am using oracle db.

Thanks

Mukesh

Attachments

02-29-2020.png (14.3 kB)
01-31-2020.png (9.1 kB)