Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

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.

Posted

You set up a calculation field with the expression

Int((Date2 - Date1)/7)

Make sure the result of the calculation is a number.

Posted

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.

Posted

I'm just having lunch... Bright and early we are!

  • Newbies
Posted

thanks, I did what you said. it works well. How do I truncate ths number? sorry for the easy questions, but i've been fumbling for some time. I am almost there!

This topic is 7458 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.