paulo111
asked on
Date of Birth Formula
Hi Experts,
Been trying Ken Hamadys age calculation formula...
I get an error?
WhileReadingRecords;
DateVar Birth:= {sps_MIU_Ilkeston_crystal_ template_d ata.child_ dob}; // Replace this with your field for Date Of Birth
DateVar Ann := CurrentDate; // Replace this with CurrentDate to get their age as of the time of the report
//or the date field of an event to get their age as of the time of that event.
if (Month(Ann) * 100) + Day (Ann) >=(Month(Birth) *100) + Day (Birth)
then Year (Ann) - Year(Birth)
else Year (Ann) - Year(Birth) -1
I get the error which prompts for a 'date is required here' in front of the {sps_MIU_Ilkeston_crystal_ template_d ata.child_ dob}
it is a datetime(8) in my sql sp!!
Been trying Ken Hamadys age calculation formula...
I get an error?
WhileReadingRecords;
DateVar Birth:= {sps_MIU_Ilkeston_crystal_
DateVar Ann := CurrentDate; // Replace this with CurrentDate to get their age as of the time of the report
//or the date field of an event to get their age as of the time of that event.
if (Month(Ann) * 100) + Day (Ann) >=(Month(Birth) *100) + Day (Birth)
then Year (Ann) - Year(Birth)
else Year (Ann) - Year(Birth) -1
I get the error which prompts for a 'date is required here' in front of the {sps_MIU_Ilkeston_crystal_
it is a datetime(8) in my sql sp!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
mlmcc