CalculateEmployeeAgeAsOfADate

Calculate Employee Age As Of A Date

Minor Business Rule

Object Name: N0800130

Parent DLL: CHRM

Location: Client/Server

Language: NER

Functional Description

Purpose

This function calculates the employee's age as of a specified date.  This does not calculate fraction 

of years, only whole years are returned.

Setup Notes and Prerequisites


Special Logic




Technical Specification


Determine the number of years between the employee's birth year and the year to calculate age as of.  

Determine if the birthday has passed as of the date to calculate as of.  If the birthday has passed, 

return the difference in years.  If the birthday has not passed, return the difference minus 1.

Data Structure

D0800130 - Calculate Employee Age As Of A Date

Parameter NameData ItemData TypeReq/OptI/O/Both
jdAsOfDateDATE01JDEDATEOPTBOTH

Calculate the date as of this date.  If this is left blank, the system date will be used.
^

jdDateBirthDOBJDEDATEREQINPUT

The employee's date of birth.

mnAgeFAGEMATH_NUMERICOPTOUTPUT

Returns the age of the employee as of the date passed in (or the system date).  
^

cErrorCodeERRCcharOPTOUTPUT

Error Codes are as follows:
0 - No Errors

1 - Date of birth is zero

2 - As of Date is before the birth date, the employee has not yet been born

^

Related Functions

None

Related Tables

None