Home » Countries » Nepal » Nepal 2016 DHS and CDC values
Nepal 2016 DHS and CDC values [message #14640] 
Wed, 25 April 2018 12:28 
Chris_Leary
Messages: 2 Registered: January 2018

Member 


I notice that typical values in v008a (CDC of interview date) are around 26774. I also believe that CDC is supposed to be the number of days since January 1, 1900. Unfortunately, when I ask Google what date was 26774 days after January 1, 1900, I'm told it was April 22, 1973. So...
For this survey, what is v008a actually measuring? I assume it is 'number of days since _____'. Can someone please fill in the blank, or straighten me out on this?
Thanks!
Chris Leary
USAID/GH/P3



Re: Nepal 2016 DHS and CDC values [message #15639 is a reply to message #14640] 
Mon, 27 August 2018 11:48 
LizDHS
Messages: 1414 Registered: February 2013

Senior Member 


Dear User, I think you are referring to CMC codes. In Nepal they have a different calendar as well.
This is what is in the DHS6 Recode (Standard Recode Manual) page 5.
Century Month Code
All dates in the data file are expressed in terms of months and years and also as century month codes. A
century month code (CMC) is the number of the month since the start of the century. For example, January
1900 is CMC 1, January 1901 is CMC 13, January 1980 is CMC 961, and September 1994 is CMC 1137.
The CMC for a date is calculated from the month and year as follows:
CMC = (YY * 12) + MM for month MM in year 19YY.
To calculate the month and year from the CMC use the following formulae:
YY = int((CMC  1) / 12)
MM = CMC  (YY * 12)
For Dates in 2000 and after the CMC is calculated as follows:
CMC = ((YYYY1900) * 12) + MM for month MM in year YYYY.
To calculate the month and year from the CMC use the following formulae:
YYYY = int((CMC  1) / 12)+1900
MM = CMC  ((YYYY1900) * 12)
____________________________________________________________
We also now have CDC
Quote:
Century Day Code (CDC)
In DHS‐7, the DHS program introduced a new concept the Century Day Code (CDC). The CDC is
analogous to the century month code and gives the number of days since the beginning of 1900. The CDC for
a date of birth is computed in a similar manner to the CMC, using the reported day, month and year of birth.
Note that for simplicity in the calculation of the CDC the assumption is that 1900 is a leap year, but this is
also how Excel handles it. This does not affect any calculations of age, as all calculations are using a
consistent base.
The formulae to calculate the CDC of a date is an iterative process calculated in 2 steps:
Step 1: calculating the number of days since 1900 to the yyyy1.
The formula to calculate the CDC is not as straight forward as the formulae to calculate the CMC
because the number of months per year is a fixed number (12 months). In the case of the CDC, the
calculation process for step 1 must be done with an iterative function because the number of days per
year varies depending if it's a leap year (366 days) or if it's regular year (365 days).
Date = [dd]/[mm]/[yyyy]
CumulativeDays1 = 0
do i = 1900 while i < [yyyy]
CumulativeDays1 = CumulativeDays1 + 365 + (LeapYear = false);
enddo;
Note: the statement (LeapYear = false) will return value of 0 or 1
Step 2: calculating the number of days from yyyy to mm/dd
An interactive function should be used in this process because the number of days per months also
varies. There are months with 30 and 31 days, besides February can have 28 or 29 days depending if
it's a leap year or not.
Date = [dd]/[mm]/[yyyy]
CumulativeDays2 = 0
xdays = 0 (working variable)
do i = 1 while i < [mm]
if mm in 1,3,5 xdays = 31 endif; (January, March, May)
if mm in 2 xdays = 28 + (LeapYear = false) endif; (February)
If mm in 4,6 xdays = 30 endif; ( April, June)
CumulativeDays2 = CumulativeDays2 + xdays;
enddo;
Note: the statement (LeapYear = false) will return value of 0 or 1
CDC = CumulativeDays1 + CumulativeDays2 + [dd]
[Updated on: Thu, 30 August 2018 11:18] Report message to a moderator



Re: Nepal 2016 DHS and CDC values [message #16630 is a reply to message #15639] 
Thu, 07 February 2019 18:30 
TrevorDHS
Messages: 671 Registered: January 2013

Senior Member 


Just a note on the Nepal Century Day Codes in v008a. The calendar used in Nepal is the Nepali calendar and the interviews were all carried out in the Nepali year 2073. The Century day code in this survey is the number of days since the start of Nepali year 2000 (not 1900 as in other surveys). The Nepali century (1/1/2000) started on April 14, 1943, which is equivalent to century day code 15810 [you can check this in Excel by typing "April 14 1943" into cell A1 in Excel, and then in cell A2 put "=value(A1)" to get the century day code]. Thus if you want to convert the century days codes for Nepal to the Western calendar, then just add 15809 to v008a or any of the other century day code variables.



Goto Forum:
Current Time: Wed Dec 11 07:23:04 Eastern Standard Time 2019
