The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Mortality » How to convert Afghan Dates to Gregorian calendar -SAS
How to convert Afghan Dates to Gregorian calendar -SAS [message #12871] Tue, 25 July 2017 14:48 Go to next message
Shams16 is currently offline  Shams16
Messages: 4
Registered: July 2017
Member
I came across a thread explaining how to convert the Afghan dates in CSPro and STATA does anyone know how to do this job in SAS? I am using Raw data from DHS website I do neither have STATA nor CSPro.

Thanks
Re: How to convert Afghan Dates to Gregorian calendar -SAS [message #13202 is a reply to message #12871] Tue, 03 October 2017 10:58 Go to previous messageGo to next message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
Dear User,
You should be able to find a way to do it by looking at the code provided in this link:https:// userforum.dhsprogram.com/index.php?t=msg&th=5916&got o=11880&#msg_11880
It's not done in SAS but should be able to provide some guidance for you perform the same operation in SAS.
Re: How to convert Afghan Dates to Gregorian calendar -SAS [message #25374 is a reply to message #13202] Thu, 13 October 2022 05:32 Go to previous messageGo to next message
betinajessen is currently offline  betinajessen
Messages: 1
Registered: October 2022
Member
Follow the link above and scroll down to see them. For example, it shows the following code:




// Create a date using the Afghan calendar.
thisDate = pc.ToDateTime(1395, 4, 22, 12, 30, 0, 0);
Console.WriteLine("Gregorian Calendar: {0:D} ", thisDate);
Console.WriteLine("Afghan 2023 Calendar: {0}, {1}/{2}/{3} {4}:{5}:{6}\n",
pc.GetDayOfWeek(thisDate),
pc.GetMonth(thisDate),
pc.GetDayOfMonth(thisDate),
pc.GetYear(thisDate),
pc.GetHour(thisDate),
pc.GetMinute(thisDate),
pc.GetSecond(thisDate));
https://www.typecalendar.com/printable-calendar

[Updated on: Fri, 14 October 2022 11:31]

Report message to a moderator

Re: How to convert Afghan Dates to Gregorian calendar -SAS [message #25842 is a reply to message #25374] Sat, 17 December 2022 06:09 Go to previous message
annachandy09 is currently offline  annachandy09
Messages: 1
Registered: December 2022
Member
Have you ever pondered why it might seem so tough to breathe and live your life at times? You are in this circumstance as a result of your mental handicap. There are ways to bring you back, so don't worry. One of the top counsellors at Annachandy.com will assist you with individual counseling services and help you steer your life in the proper route. Our goal is to give you and your family advice on how to strengthen your educational foundation.
Previous Topic: Survival status of preceding birth
Next Topic: Postnatal care attendance - Liberia 2013 vs 2019
Goto Forum:
  


Current Time: Fri Mar 29 08:19:52 Coordinated Universal Time 2024