August 19, 201510 yr Newbies i´ve got this in the filemaker´s site to know the ages of my contacts (i´m learning to use LET function): Let ( [ T = Get ( CurrentDate ) ; YT = Year ( T ) ] ;YT - Year ( birthdate ) - ( T < Date ( Month ( birthdate ) ; Day ( birthdate ) ; YT ) ) ) what i did before was: Let ( [ T = Get ( CurrentDate ) ; YT = Year ( T ) ] ;If (T < Date ( Month ( birthdate ) ; Day ( birthdate ) ; YT ) ; YT - Year ( birthdate ) - 1 ;YT - Year ( birthdate ))) both of them work perfectly someone can help me to understand this: YT - Year ( birthdate ) - ( T < Date ( Month ( birthdate ) ; Day ( birthdate ) ; YT ) ) )
August 19, 201510 yr The expression in parentheses: T < Date ( Month ( birthdate ) ; Day ( birthdate ) ; YT ) is a comparison; it returns 1 when true, 0 when false. So subtracting this from the difference between years accomplishes the same thing as your If() construct does. This has nothing to do with the Let() function.
August 19, 201510 yr Author Newbies The expression in parentheses: T < Date ( Month ( birthdate ) ; Day ( birthdate ) ; YT ) is a comparison; it returns 1 when true, 0 when false. So subtracting this from the difference between years accomplishes the same thing as your If() construct does. This has nothing to do with the Let() function. Thank you, so much!
Create an account or sign in to comment