Skip to main content

Automatic conversion of Hejira dates to Gregorian dates in Epi Info version 6.02 software

In the past, a problem with using Epi Info for epidemiological analysis in Saudi Arabia has been the need to convert Hejira dates to Gregorian dates. Recently, this problem became critical when we decided to design a program for the Pediatric Nutrition Surveillance System (PedNSS) in the Primary Health Care Centers (PHCCs). The anthropometric program in Epi Info requires a Gregorian date to accurately calculate a child's age for calculating growth indices.
A formula written for Database was modified for use in the Check or Analysis program of Epi Info version 6.02.1 This conversion gives an accuracy of +/- one day. This error is acceptable for most epidemiologic applications and is no worse than other conversion programs To make the conversion, a Hejira date, month, and year should be separated as numerical variables e.g. Hejira Day ## Month ## Year #### in the questionnaire file. A date variable is also added to the questionnaire file as a place to put the result of the date conversion, e.g. (Greglorian <dd/mm/yy>. After using ENTER to make a data entry file, the following formula should be added in a CHECK file:
  • Year
  • LET Greg = "01/01/00"
  • (This sets 01/01/1900 as the starting reference point. )
  • LET Greg = Greg +((year-1)*354.3848121+(month-1)*29.53206786+day-1)-466607.5
    • (This computes the number of days between the reference point and the Hejira date that is entered and automatically converts these days to the Gregorian calendar.)
  • END
Since Hejira dates may be needed for administrative purposes, a new variable (e.g. S.Hejira <A>) (note: the Hejira variable has eight spaces) can be added to the questionnaire. The following command in a CHECK file will make a single string variable from the three numeric Hejira variables:
  • S.Hejira
  • LET S.Hejira=(day+"/"+month+"/"+year)
  • END
    • to display the Hejira date as a single string variable in the day, month, year format.
  1. T.A. Mohammed. Date program conversion. Alam Al-Computer 1994;7(84): 28-30.