The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Nepal » CMC codes
CMC codes [message #60] Mon, 18 February 2013 17:53 Go to next message
DHS user is currently offline  DHS user
Messages: 111
Registered: February 2013
Senior Member
I am working with the DHS surveys in Nepal and have a question regarding the interview date (v008) for each of the surveys. When using your recommended formulas to convert these CMC dates to year and month formats, the years do not appear to correspond to the survey year. For example, I get years 1952 and 1953 for the 1996 survey wave.

Can you please advise as to how to obtain the correct year for this variable?

Re: CMC codes [message #155 is a reply to message #60] Tue, 19 March 2013 10:20 Go to previous messageGo to next message
Kerry is currently offline  Kerry
Messages: 9
Registered: March 2013
Member
The Nepal DHS datasets use the Nepali lunar calendar to format the CMC, which makes moot the standard conversion formula. I believe the Ethiopia surveys have a similar issue. It would be helpful for me as well if someone could share the Nepal-specific conversions.

Having the CMC formatted this way is of no consequence as long as you're not interested in an absolute date (e.g. survey year) but in a relative length of time, where you'd subtract one CMC from another.
Re: CMC codes [message #160 is a reply to message #155] Tue, 19 March 2013 18:25 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
The issue for Nepal is that the local calendar years were used in the calculation of CMCs instead of the Gregorian calendar that is used in the west. For example, the current year in Nepal is 2069 and it started on April 13, 2012. The standard CMC calculation is done, but using the Nepali dates, so April 2012 (CMC 1348 if using the Gregorian calendar) is CMC 2029 based on the Nepali dates. You can convert the CMCs to the Gregorian calendar by subtracting the difference (681). This is approximate as the Nepali month starts in the middle of the Gregorian month, but should be good enough for most purposes. This should work for each of the surveys, except for the 1996 survey. For the 1996 survey the years were recorded using 2 digit years and the Nepali year 2052 was recorded as just 52. For this survey to convert to Gregorian dates, add 519 to the CMC.

As Kerry points out for most analysis the fact that the CMC is based on the local calendar years has no effect on the analysis unless you are interested in absolute dates.
Re: CMC codes [message #216 is a reply to message #160] Thu, 28 March 2013 09:18 Go to previous messageGo to next message
Kerry is currently offline  Kerry
Messages: 9
Registered: March 2013
Member
Very helpful. Thanks!
Re: CMC codes [message #856 is a reply to message #216] Tue, 22 October 2013 13:42 Go to previous messageGo to next message
l.bliznashka is currently offline  l.bliznashka
Messages: 1
Registered: October 2013
Location: Washington, DC, USA
Member
I'm also working with the 2011 Nepal DHS (Children dataset), and trying to convert Nepali dates to Gregorian ones (birthday and interview years). For my analysis I need the absolute dates: date, month, and year. So, while your discussion is quite helpful, it's unfortunately not precise enough for my purposes.

Any advice on how to get the absolute years, months and dates from Nepali to Gregoarian format? Thanks!
Re: CMC codes [message #964 is a reply to message #856] Thu, 05 December 2013 23:52 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
We do not have code for converting nepal dates at the level of day, month and year to Gregorian dates in day, month and year form, but there are examples of the calculations needed available online. For example, there is code written in PHP at http://sourceforge.net/projects/nepalidateconve/ for converting nepali dates. You could use the code here and rewrite the equivalent calculations in the code for which ever software you are using for analysis. I realize that this doesn't fully solve your problem, but hopefully it provides enough information to be able to write the code necessary.
Re: CMC codes [message #8183 is a reply to message #964] Mon, 07 September 2015 14:58 Go to previous messageGo to next message
Rojan is currently offline  Rojan
Messages: 4
Registered: September 2015
Location: Kathmandu
Member
If we need exact English date of Nepali date then we need to convert it. I use to convert Nepali date into English date in MS Excel using conversion factor that I have prepared. If you still need to convert date and you are not getting solution, please write me. I can provide you excel file to convert Nepali date into English. you can convert many date at one time.
Re: CMC codes [message #15739 is a reply to message #8183] Mon, 10 September 2018 02:59 Go to previous messageGo to next message
timarthias is currently offline  timarthias
Messages: 2
Registered: September 2018
Location: Indonesia
Member
Hi Rojan,

I am working with Nepali 2018 datasets using Bikram system (including date, month and year) and need to convert them into Gregorian calendar. Would you happen to have the MS Excel conversion file for 2018? Or if you have ideas how to convert the dates using Stata. Thank you very much.
Re: CMC codes [message #15740 is a reply to message #15739] Mon, 10 September 2018 03:33 Go to previous messageGo to next message
Rojan is currently offline  Rojan
Messages: 4
Registered: September 2015
Location: Kathmandu
Member
Please send me your email address, I will send you the excel file.

Re: CMC codes [message #15741 is a reply to message #15740] Mon, 10 September 2018 05:24 Go to previous messageGo to next message
timarthias is currently offline  timarthias
Messages: 2
Registered: September 2018
Location: Indonesia
Member
It's timarthias@gmail.com
Thank you very much!


T
Re: CMC codes [message #15744 is a reply to message #15741] Mon, 10 September 2018 10:11 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
Hi Rojan,

Any chance that you can post the Excel spreadsheet here. It may be useful for other data users too.

Thanks.
Re: CMC codes [message #15927 is a reply to message #15740] Sat, 06 October 2018 20:43 Go to previous messageGo to next message
kmarchesi is currently offline  kmarchesi
Messages: 2
Registered: October 2018
Member
Hi Rojan,

If I send you my email, could I too get the excel sheet to convert dates?
Re: CMC codes [message #15928 is a reply to message #15927] Sun, 07 October 2018 00:13 Go to previous messageGo to next message
Rojan is currently offline  Rojan
Messages: 4
Registered: September 2015
Location: Kathmandu
Member
Yes. Please send me your email.

R
Re: CMC codes [message #15931 is a reply to message #15928] Sun, 07 October 2018 10:39 Go to previous messageGo to next message
kmarchesi is currently offline  kmarchesi
Messages: 2
Registered: October 2018
Member
Hi Rojan

My email is kmarchesi@clarku.edu. Thank you so much.

Best
K
Re: CMC codes [message #16585 is a reply to message #15928] Sat, 02 February 2019 13:06 Go to previous messageGo to next message
sabine is currently offline  sabine
Messages: 1
Registered: February 2019
Location: Stanford, CA
Member
Hi Rojan,

Would you mind also sending me the excel sheet for date conversion? My email is sloos@stanford.edu

Thanks!
sabine
Re: CMC codes [message #17742 is a reply to message #16585] Sun, 19 May 2019 09:37 Go to previous messageGo to next message
umg is currently offline  umg
Messages: 2
Registered: January 2019
Member
Thank you Rojan for your help,

Please send me the excel sheet for date conversion in my email umeth.th@gmail.com

Thanks!
Re: CMC codes [message #17823 is a reply to message #60] Mon, 17 June 2019 15:58 Go to previous messageGo to next message
fuller14 is currently offline  fuller14
Messages: 1
Registered: June 2019
Member
Hi Rojan,

I would like to request the excel sheet for date conversion as well. My email address is: fuller14@uw.edu

Thanks!
John

[Updated on: Mon, 17 June 2019 15:58]

Report message to a moderator

Re: CMC codes [message #17832 is a reply to message #17823] Thu, 20 June 2019 15:20 Go to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
I realized that the conversion from Nepali to English dates is actually relatively simple and have a couple of solutions below.

For converting dates, there are a couple of things you can do:

1) Convert century month codes (e.g. v008). This is not exact as the Nepali months start in the middle of the Western months, but approximately you can subtract 681 months from the Century month code to be equivalent to the Western calendar's century month code.

2) Convert century day codes (e.g. v008a). To convert the century day codes in the dataset to Western version, add 15809. For example, Shrawan 18, 2073 (century day code 26775) is the same as August 2, 2016 which would be century day code 42584, and 42584-26775=15809.

You can then check the day, month, or year of any value in Excel by using the following formulae:
If cell A1 is 42584 then
=day(A1) would give 2
=month(A1) would give 8
=year(A1) would give 2016

If you want to produce day, month and year variables in Stata, you can do the following:

* Adjust to Stata date - add 15809 to adjust for the calendars, and subtract 21916 as Stata counts days from 1/1/1960
gen v008a_stata=v008a+15809-21916
* Get day, month and year from Stata date
gen v008a_d=day(v008a_stata)
gen v008a_m=month(v008a_stata)
gen v008a_y=year(v008a_stata)

You can then re-create the century month code if you want to from these as cmc=(v008a_y - 1900) * 12 + v008_m.

[Updated on: Thu, 20 June 2019 15:21]

Report message to a moderator

Previous Topic: V007 in most recent Nepal DHS survey
Next Topic: maternal and child health
Goto Forum:
  


Current Time: Sat Dec 7 18:06:06 Coordinated Universal Time 2024