Newbies redefmbrasil Posted August 19, 2015 Newbies Posted August 19, 2015 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 ) ) )
comment Posted August 19, 2015 Posted August 19, 2015 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. 1
Newbies redefmbrasil Posted August 19, 2015 Author Newbies Posted August 19, 2015 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!
Recommended Posts
This topic is 3476 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