05-27-2012، 10:49 AM
مشکل حل شد!
کد:
string[] StrArray = s.Split('/');
string m, r, sal;
m = StrArray[0];
r = StrArray[1];
sal = StrArray[2];
sal = sal.Substring(0, 4);
PersianCalendar pc = new PersianCalendar();
string day, mon, year;
DateTime rr = new DateTime(Convert.ToInt32( sal),Convert.ToInt32( m),Convert.ToInt32( r));
day = pc.GetDayOfMonth( rr ) .ToString();
mon = pc.GetMonth(rr).ToString();
year = pc.GetYear(rr).ToString();
Label1.Text = day+"/"+mon +"/"+year ;