The DHS Program User Forum - RDF feed
https://userforum.dhsprogram.com/index.php
CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=60&th=40#msg_60
Can you please advise as to how to obtain the correct year for this variable?
]]>DHS user2013-02-18T22:53:36-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=155&th=40#msg_155
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.]]>Kerry2013-03-19T14:20:40-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=160&th=40#msg_160
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.]]>Trevor-DHS2013-03-19T22:25:26-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=216&th=40#msg_216
Kerry2013-03-28T13:18:53-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=856&th=40#msg_856
Any advice on how to get the absolute years, months and dates from Nepali to Gregoarian format? Thanks!]]>l.bliznashka2013-10-22T17:42:40-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=964&th=40#msg_964
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. ]]>Trevor-DHS2013-12-06T04:52:09-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=8183&th=40#msg_8183
Rojan2015-09-07T18:58:17-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=15739&th=40#msg_15739
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. ]]>timarthias2018-09-10T06:59:52-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=15740&th=40#msg_15740
]]>Rojan2018-09-10T07:33:30-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=15741&th=40#msg_15741
timarthias@gmail.com
Thank you very much!
T
]]>timarthias2018-09-10T09:24:48-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=15744&th=40#msg_15744
Any chance that you can post the Excel spreadsheet here. It may be useful for other data users too.
Thanks.]]>Trevor-DHS2018-09-10T14:11:32-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=15927&th=40#msg_15927
If I send you my email, could I too get the excel sheet to convert dates?
]]>kmarchesi2018-10-07T00:43:46-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=15928&th=40#msg_15928
R]]>Rojan2018-10-07T04:13:26-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=15931&th=40#msg_15931
My email is kmarchesi@clarku.edu. Thank you so much.
Best
K]]>kmarchesi2018-10-07T14:39:13-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=16585&th=40#msg_16585
Would you mind also sending me the excel sheet for date conversion? My email is sloos@stanford.edu
Thanks!
sabine]]>sabine2019-02-02T18:06:43-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=17742&th=40#msg_17742
Please send me the excel sheet for date conversion in my email umeth.th@gmail.com
Thanks!]]>umg2019-05-19T13:37:08-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=17823&th=40#msg_17823
I would like to request the excel sheet for date conversion as well. My email address is: fuller14@uw.edu
Thanks!
John]]>fuller142019-06-17T19:58:14-00:00Re: CMC codes
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=17832&th=40#msg_17832
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.]]>Trevor-DHS2019-06-20T19:20:38-00:00