rob Posted December 19, 2015 Posted December 19, 2015 (edited) So I tried calc with Date ( 12 ; 19 ; Year ( 1951 ) + 65 ) and it says 12/19/0071 and that is not what I want. I have date field with person's birthday and I want to know what date they will turn 65. What am I doing wrong? This does not work either Employees::birthdate + Year ( 65 ). I suppose I could calculate the number of days in 65 years and then add it but I am just not understanding this. Ideas guys? Edited December 19, 2015 by rob
comment Posted December 19, 2015 Posted December 19, 2015 (edited) 2 hours ago, rob said: So I tried calc with Date ( 12 ; 19 ; Year ( 1951 ) + 65 ) and it says 12/19/0071 and that is not what I want. Well, Year ( 1951 ) returns 6, so that makes no sense. If you had used Date ( 12 ; 19 ; 1951 + 65 ) you would have received the expected result. 2 hours ago, rob said: I have date field with person's birthday and I want to know what date they will turn 65. For this, you should be using: Date ( Month ( Birthdate ) ; Day ( Birthdate ) ; Year ( Birthdate ) + 65 ) Edited December 19, 2015 by comment 1
rob Posted December 19, 2015 Author Posted December 19, 2015 Thank you Comment. Now I should have known this because I was using data viewer to enter the date manually and I knew the 65 must be in the year portion but I did it wrong I see. Good that I did because now I learn more but I have been scratching my head on this Year ( 1951 ) returns 6 Would you explain the 6 please? I did notice that Year ( 1951 ) + 65 ) and it says 12/19/0071 and that 71 - 65 equals 6 but that does not explain why.
comment Posted December 19, 2015 Posted December 19, 2015 22 minutes ago, rob said: Year ( 1951 ) returns 6 Would you explain the 6 please? The Year() function requires date as its parameter. The supplied parameter (1951) is a number, not a date. Therefore, Year ( 1951 ) is evaluated as: Year ( GetAsDate ( 1951 ) ) Now, GetAsDate ( 1951 ) returns 5/5/0006, because the 1,951st day since the beginning of Filemaker's era on 1/1/0001 is 5/5/0006. Further illustration: Year ( 365 ) returns 1; Year ( 366 ) returns 2. 2
rob Posted December 19, 2015 Author Posted December 19, 2015 Wow. Things like this are not in help and you explained it clearly. Thank you very much.
Recommended Posts
This topic is 3318 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