jmd0252
Programmer
- May 15, 2003
- 667
ok first this is not my formula.
stringvar x := {PM_EMPMASTER.BIRTH_DATE};
datevar birth := date(val(left(x,4)),val(mid(x,5,2)),val(right(x,2)));
DateVar Ann := jdyear; // 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
now if I use "currentdate", for jdyear the formula calculate the age of the person, at run time of report.
I have added the parameter jdyear,, defined as a date, so you can enter the end of the year,, and see who will be what age during the year.
the formula editor kicks using the jdyear,,
"a number, currency amount, etc etc is expected her", so it does not seem to be recognizinf that my parameter is a date,, solution???
stringvar x := {PM_EMPMASTER.BIRTH_DATE};
datevar birth := date(val(left(x,4)),val(mid(x,5,2)),val(right(x,2)));
DateVar Ann := jdyear; // 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
now if I use "currentdate", for jdyear the formula calculate the age of the person, at run time of report.
I have added the parameter jdyear,, defined as a date, so you can enter the end of the year,, and see who will be what age during the year.
the formula editor kicks using the jdyear,,
"a number, currency amount, etc etc is expected her", so it does not seem to be recognizinf that my parameter is a date,, solution???