help eperiod                                                   dialog:  eperiod
-------------------------------------------------------------------------------

Title

eperiod -- Elapsed period calculator - age calculator

Syntax

eperiod final_date initial_date [if] [in] ,[ options]

Description

For the elapsed time between final_date and initial_date, eperiod calculates the number of Years, Month, or days according to the specified option. Input variables could either have a date format or not.

Options

Main -----------------------------------------------------------------------------

year Calculates the elapsed period by years between initial and final date.

month Calculates the elapsed period by months between initial and final date.

day Calculates the elapsed period by days between initial and final date.

Options -----------------------------------------------------------------------------

today(freq) May not be used with a final_date. Calculates the elapsed period by freq between final and current date. Where freq is:

freq y Year frequency. m Month frequency. d day frequency.

generate(newvar) Specifies the name of the new variable to be created. If newvar is not specified, eperiod creates a default variable name.

Example

. eperiod enrolled graduated, year . eperiod enrolled graduated, month generate(studied_months) . eperiod graduated, today(d) generate(experience_days)

Author

Juan M. Villa Inter-American Development Bank (not responsible) juanmiguelv@iadb.org