December 19, 201510 yr 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, 201510 yr by rob
December 19, 201510 yr 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, 201510 yr by comment
December 19, 201510 yr Author 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.
December 19, 201510 yr 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.
December 19, 201510 yr Author Wow. Things like this are not in help and you explained it clearly. Thank you very much.
Create an account or sign in to comment