June 22, 200421 yr 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.
June 22, 200421 yr You set up a calculation field with the expression Int((Date2 - Date1)/7) Make sure the result of the calculation is a number.
June 22, 200421 yr 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.
June 22, 200421 yr Argh. You beat me Vaughn. It must be because it is already tomorrow where you are. That seems to be an unfair advantage.
June 22, 200421 yr Author Newbies 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!
Create an account or sign in to comment