"parse persian date string to datetime c#" Code Answer's
You're definitely familiar with the best coding language C# that developers use to develop their projects and they get all their queries like "parse persian date string to datetime c#" answered properly. Developers are finding an appropriate answer about parse persian date string to datetime c# related to the C# coding language. By visiting this online portal developers get answers concerning C# codes question like parse persian date string to datetime c#. Enter your desired code related query in the search bar and get every piece of information about C# code related question on parse persian date string to datetime c#.
parse persian date string to datetime c#
PersianCalendar p = new PersianCalendar();
string PersianDate1 = textBox1.Text;
string[] parts = PersianDate1.Split('/', '-');
DateTime dta1 = p.ToDateTime(Convert.ToInt32(parts[0]), Convert.ToInt32(parts[1]), Convert.ToInt32(parts[2]), 0, 0, 0, 0);
string PersianDate2 = textBox2.Text;
string[] parts2 = PersianDate2.Split('/', '-');
DateTime dta2 = p.ToDateTime(Convert.ToInt32(parts2[0]), Convert.ToInt32(parts2[1]), Convert.ToInt32(parts2[2]), 0, 0, 0, 0);
string s = (dta2 - dta1).ToString().Replace(".00:00:00", "");
textBox3.Text = s; // Show the result into the textbox
Source: stackoverflow.com
All those coders who are working on the C# based application and are stuck on parse persian date string to datetime c# can get a collection of related answers to their query. Programmers need to enter their query on parse persian date string to datetime c# related to C# code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about parse persian date string to datetime c# for the programmers working on C# code while coding their module. Coders are also allowed to rectify already present answers of parse persian date string to datetime c# while working on the C# language code. Developers can add up suggestions if they deem fit any other answer relating to "parse persian date string to datetime c#". Visit this developer's friendly online web community, CodeProZone, and get your queries like parse persian date string to datetime c# resolved professionally and stay updated to the latest C# updates.