Forum Discussion

ArshadKhwaja's avatar
ArshadKhwaja
Qrew Commander
8 years ago

Calculating months between dates

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? 
  • 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)
    )