Newbies RetinaDoc Posted June 22, 2004 Newbies Posted June 22, 2004 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.
Vaughan Posted June 22, 2004 Posted June 22, 2004 You set up a calculation field with the expression Int((Date2 - Date1)/7) Make sure the result of the calculation is a number.
DanBrill Posted June 22, 2004 Posted June 22, 2004 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.
DanBrill Posted June 22, 2004 Posted June 22, 2004 Argh. You beat me Vaughn. It must be because it is already tomorrow where you are. That seems to be an unfair advantage.
Newbies RetinaDoc Posted June 22, 2004 Author Newbies Posted June 22, 2004 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!
Recommended Posts
This topic is 7720 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 accountSign in
Already have an account? Sign in here.
Sign In Now