You can be 99.9 % sure that your files will not contain any hidden corruption, that sometime soon will bring the system down and cause other expenses, likely a multiple of the FMVis license fee. Please contact the individual developer with any questions or problems.The licensed version of FMVis offers extensive error checking. Note: these functions are not guaranteed or supported by. I try all of them but have a problem with the February 29 and of course, at the end there is a problemįYI this CF does not return the correct age for a Date of Birth of and a current date of because it says I am 18, rather than 17. So output goes to something like "34 Y, 3 M, 13 D" which fits nicer into the field I set up. I brought it over as is, and then made a duplicate, named it age_abbreviated, and changed the output to: It ensures that if there is one day/month/year that system returns "month" instead of "months": This function age ( date1 date2 ) always assumes you want a positive figure.Ĭ) Parameters - I like that it passes back info as 4 separate parameters : Y,M,D,Sentenceĭ) Singular/Plural - Make this adjustment to the last part of the calculation. I assume that's because there's room for defining a month as 30/31 days.ī) Absolute Value - The "FullAge (calculation, text result)" will give a negative number if you swap the dates around. It works and I'm happy with the function.Ī) Accuracy - I've tested it against "FullAge (calculation, text result)" mentioned in this discussion by Ganesh on May 6 2013. = Year (Birthdate ) + Month (Birthdate ) / 100 + Day (Birthdate ) / 10000 Just saw this on a post at (unrelated to the age calculation issue) but the post by loSTaNT had a file that had an awesome age calculation field that works and is much simpler as well. GetAsText ( Year ( Get ( CurrentDate ) ) - Year ( Birthdate ) - If ( Get ( CurrentDate ) < Date ( Month ( Birthdate ) Day ( Birthdate ) Year ( Get ( CurrentDate ) ) ) 1 0 ) ) & " Years, " & GetAsText ( Mod ( Month ( Get ( CurrentDate ) ) - Month ( Birthdate ) + 12 - If ( Day ( Get ( CurrentDate ) ) < Day ( Birthdate ) 1 0 ) 12 ) ) & " Months, " & GetAsText ( Day ( Get ( CurrentDate ) ) - Day ( Birthdate ) + If ( Day ( Get ( CurrentDate ) ) ≥ Day ( Birthdate ) 0 If ( Day ( Get ( CurrentDate ) - Day ( Get ( CurrentDate ) ) ) < Day ( Birthdate ) Day ( Birthdate ) Day ( Get ( CurrentDate ) - Day ( Get ( CurrentDate ) ) ) ) ) ) & " Days " To fix that, you can change the last output line to: This one works!įunction seems to work dandy! One minor quibble is that the fourth value output always assumes a plural value (i.e. I tested this against another custom function that also failed on the birthday. I agree with the others that seems to be the best age calc function available. Works great, fixed issues I had with other functions. I had previously used the custom function at but that produced errors ON THE ACTUAL BIRTHDAY date. It's the only age function that calc's the date correctly. ĭon't know why the vote is so low on this function? This formula is meant as a replacement for the one given at FileMaker Custom HelpĪddress comments to an example file at. To access these results use LeftValues (), MiddleValues (), and RightValues () respectively. The result is provided as a line separated list containing Years, Months, Days. This calculation takes into account different days in a month as well as leap years and negative distances. Y & " years, " & m & " months, and " & d & " days" & ¶ Y = Year ( d2 ) - Year ( d1 ) - ( ( Month ( d2 ). Function definition: (Copy & paste into FileMaker's Edit Custom Function window) // © 2006 Winfried Huslik, Let ( [ĭ = mod ( Day ( d2 ) - Day ( d1 ) Day (ĭate ( Month ( d1 ) + 1 0 year ( d1 ) ) ) )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |