title: How to convert a Persian date into a Gregorian date?
body: <p>I use the function below to convert Gregorian dates to Persian dates, but I've been unable to write a function to do the reverse conversion. I want a function that converts a Persian date (a string like "1390/07/18 12:00:00") into a Georgian date.</p>
  
  <pre><code>public static string GetPdate(DateTime _EnDate)
  {
      PersianCalendar pcalendar = new PersianCalendar();
      string Pdate = pcalendar.GetYear(_EnDate).ToString("0000") + "/" +
         pcalendar.GetMonth(_EnDate).ToString("00") + "/" +
         pcalendar.GetDayOfMonth(_EnDate).ToString("00") + " " +
             pcalendar.GetHour(_EnDate).ToString("00") + ":" +
             pcalendar.GetMinute(_EnDate).ToString("00") + ":" +
             pcalendar.GetSecond(_EnDate).ToString("00");
  
      return Pdate;
  }
  </code></pre>