Skip to Content
author's profile photo Former Member
Former Member

Last month end date based on current date

Hi,

How to show last month end date based on the current date.

Eg:

Current date = "08/26/09"

Var- Last Month End Date = "07/31/09" etc...,

Please help me how to get it...

Thank You!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Aug 26, 2009 at 05:45 AM

    HI

    Please use following formula.

    =RelativeDate(CurrentDate();-DayNumberOfMonth(CurrentDate()))

    --Kuldeep

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Kuldeep Chitrakar

      Thanks Kuldeep and all,

      I got solution:

      =If(Month([Current Date]) InList("January";"March";"May";"July";"August";"September";"December");LastDayOfMonth(RelativeDate([k5] ;-31));If(Month([Current Date]) InList("April";"June";"October";"November");LastDayOfMonth(RelativeDate([k5] ;-30));If(Mod(Year([Current Date]);4)=0;LastDayOfMonth(RelativeDate([k5] ;-29));LastDayOfMonth(RelativeDate([k5] ;-28)))))

      Thank You!

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.