stuj1026 Posted February 22, 2002 Posted February 22, 2002 Hope someone can help me here!! We have a field with the birthday of a person. We need to determine his age today! I am not sure of the calculation to use because of leap years and such.. any help would be greatly appreciated.. Thanks Stu
Newbies autdesign Posted February 22, 2002 Newbies Posted February 22, 2002 Stuj, There may be an easier solutions, but I quickly tested this and it worked. 1. Create a calculation field c_bday. code: Year(birthday_field) 2. Create a calculation field c_today. Use the 'Today' from the Date Functions menu and make sure the output of this field is TEXT. 3. Create a calculation field c_age. Use code: If(Left(bday_text, 5) <= Left(c_today, 5), Right(c_today,4) - Right(bday_text,4),Right(c_today,4) - Right(bday_text,4) - 1) Hope this helps, Tim [ February 22, 2002, 09:46 AM: Message edited by: autdesign ]
Fitch Posted February 22, 2002 Posted February 22, 2002 FileMaker.com has an article about this. Click here. Note: the article does caution the use of the Today function, but for some reason, doesn't mention Status(CurrentDate) as an alternative -- it's generally a much better way to go.
Chuck Posted February 22, 2002 Posted February 22, 2002 It may have been written before a version of FileMaker came out with Status functions. The only real problem with the Today function is that is only evaluates when FileMaker opens the file, so if the file is left open overnight, Today won't return the correct date. Status( CurrentDate ) doesn't have this limitation. FileMaker has kept the Today function around for backwards compatibility. Chuck
Recommended Posts
This topic is 8367 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