BusinessObjects Board

need to display year of the (previous month)

I need to display the following information on the header of the report.

previousmonth/20/year    TO     currentmonth/19/year

i have created the following formula so far:


="From: "+ (MonthNumberOfYear(CurrentDate())-1)+ "/20/"+ "TBD"
+ " to " +FormatDate(CurrentDate();"MM/19/yyyy")
 

if you notice, i am very close to what is needed. But the only problem is the “TBD” part. Suppose say if i put

FormatDate(CurrentDate();"yyyy")

this works until 2011 december. But for the month of january, it still displays 2011 which is a problem.

so i need the following :

    From: 12/20/2011 to 01/19/2012       

what needs to be in the “TBD” part of the formula? basically i need the year of the previous month.


polaant :us: (BOB member since 2006-08-08)

This is useful.

https://bobj-board.org/t/139560


Rakesh_K :india: (BOB member since 2007-12-11)

try this,

=FormatDate(RelativeDate(LastDayOfMonth([Date]);-31);"yyyy")

Thanks,
Zaif


zaif235 :us: (BOB member since 2010-06-15)

Thank You.

The formula worked fine.


polaant :us: (BOB member since 2006-08-08)