Jump to content

calculating time bewteen dates


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

Recommended Posts

  • Newbies

I am a total newbie to filemaker. I have set up a template to enter data and that went pretty well. I am stuck on one thing though. I have two date entries. (dd/mm/yyyy) and I want to automatically calculate the difference between them in weeks, ie 01/01/2004 to 02/01/2004 = 4 weeks. how do I do this? I set up what I thought was a calculation (date1-date2=) but that just gave me jibberish. any help is greatly appreciated.

Link to comment
Share on other sites

You set up a calculation field with the expression

Int((Date2 - Date1)/7)

Make sure the result of the calculation is a number.

Link to comment
Share on other sites

Since the second date will be later than the first, it should Date2 - Date1.

So...

Difference = (Date2 - Date1)/7

Will be the difference in weeks. Date1 and Date2 should be in date format. Difference is a Number result. You can then round this, truncate it, or convert the decimal portion back to days as you see fit.

Link to comment
Share on other sites

This topic is 7103 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
×
×
  • Create New...

Important Information

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