Skip to Content
avatar image
Former Member

1st day of previous month

Hello,

My name is Neuza Sous, and I'm working with Business Object since last months so I need your help so solve a little problem.

I had use the following formula to give me the 'Last day of previous month', but now the formula stop worked because when it calculates the month it takes one the the current month, but in case of January this doesn't work because is the month 1.

I need to current the formula or update it, and I thought to do it we a 'If' but I'm not sure about how to do it.

Can you please help me?

Thank you in advance.

Neuza Sousa

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jan 08, 2015 at 01:16 PM

    Hi,

    Can you add a condition (textual explanation), if(month=jan, 1st day of lastyear december,this formula). ?

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 08, 2015 at 04:22 PM

    A bit long winded,but gives the answer you need.  There probably is a better way of doing it.

    =ToDate("01/"+(ToNumber(FormatDate(RelativeDate((ToDate("01/"+(ToNumber(FormatDate(CurrentDate();"MM")))+"/"+ToNumber(FormatDate(CurrentDate();"yy"));"dd/MM/yyyy"));-1);"MM")))+"/"+ToNumber(FormatDate(RelativeDate((ToDate("01/"+(ToNumber(FormatDate(CurrentDate();"MM")))+"/"+ToNumber(FormatDate(CurrentDate();"yy"));"dd/MM/yyyy"));-1);"yy"));"dd/MM/yyyy")

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 13, 2015 at 07:34 PM

    Hi Neuza,

        Try the below formula in WebI to get last day of previous month for any month in the year

    =FormatDate(RelativeDate(ToDate("01/" + FormatDate(CurrentDate();"MM/yyyy");"dd/MM/yyyy");-1);"dd/MM/yyyy"),

    Regards,

    Balajee SK

    Add comment
    10|10000 characters needed characters exceeded