Convert Text Date to Date for Age Calculation
I am using FMPro 11 Adv with Win 7 64bit. I have set up an Age Test Table to perform Calculation of Age, based on DeathDate - BirthDate, for various scenarios, as shown in Age Test Table below. With outside help, I have solved the basic Calculation Coding, but I am left with a Problem of Calculating on Partial DeathDates. DeathDates, in my case have to be in a Text Field, because the source material I have to use from Descendants, does not always provide the Full Date, so it has to be entered as Short Dates.
Can anyone offer assistance with further Coding required to solve this part of the Calculation, as I am not familiar with Coding. I do not even know what Programming Language is used in Filemaker.
Copy of Coding so far to achieve results for Full Dates and Blank Fields in Records, as seen in below copy of Age Test Table.
DateX = Get ( CurrentDate );
Date1 = Table::BirthDate;
Date2 = Table::DeathDate;
Date2 = Case ( Date2 = ""; DateX; Date2 );
Year1 = Year ( Date1 );
Year2 = Year ( Date2 );
Day1 = DayOfYear ( Date1 );
Day2 = DayOfYear ( Date2 );
Adjustment = Case ( Day2 < Day1; ( -1 ); 0 ) ];
Case ( Date1 <> ""; ( Year2 - Year1 + Adjustment ); "" )