Discussions

Expand all | Collapse all

Calculating months between dates

  • 1.  Calculating months between dates

    Silver
    Contributor
    Posted 01-29-2018 21:28
    I need to return a string if a date is falling in next 6, 12, 24 month.  I tried to use the following to construct first line but does not look like I have got this right. 

    If(AdjustMonth([Lease Expiry],6)< 6, "Next 6 Months")

    Could someone help? 


  • 2.  RE: Calculating months between dates

    Posted 01-29-2018 21:33
    Try this

    If(
    isnull([lease expiry], "Missing Lease Expiry",
    AdjustMonth([Lease Expiry],0) <= Today(), "Expired",
    AdjustMonth([Lease Expiry],-6) <= Today(), "Next 6 Months",
    AdjustMonth([Lease Expiry],-12) <= Today(), "Next 12 months",
    AdjustMonth([Lease Expiry], -24) <= Today(), "Next 24 Months", "More that 24 months)
    )


  • 3.  RE: Calculating months between dates

    Silver
    Contributor
    Posted 01-29-2018 21:40
    Mark

    As always learning from you. Many thanks.