Jump to content

Amount of days/months expired


This topic is 5796 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have got a calculation written to calculate if a date has expired but I'm not sure how to calculate the amount of time that has expired??

My calc is

If ( renewal date ≤ Get ( CurrentDate ) ; "Expired" ; "" )

But how do I work out (in this instance) how many months have expired??

Thanks in advance

Link to comment
Share on other sites

Depending on how what you want to see as the "Months"

this could be as simple as

(End Date - Start Date) / 30

Or this one that I borrowed from John Mark Osborne:

(Year(End Date + 1) -

Year(Start Date + 1)) * 12 +

(Month(End Date + 1) -

Month(Start Date + 1)) -

Case(Day(End Date + 1) = Day(Start Date); 0; Day(End Date + 1) < Day(Start Date + 1); 1; 0)

HTH

Lee

[color:red]p.s.

This calculation comes from a file by JMO that he sells at his web site (see the sponsors) and is well worth the price, as it has several good calculations. Link

Edited by Guest
p.s.
Link to comment
Share on other sites

This topic is 5796 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.