What is an alternate way of converting string DateTime to any format other than Convert.ToDateTime() method?

 Posted by vishalneeraj-24503 on 12/24/2013 | Category: C# Interview questions | Views: 2275 | Points: 40
Answer:

We can also use DateTime.Parse method to convert string to date and also convert given date into any date format.

For Example:-

string dt = DateTime.Parse("24/12/2013").ToString("dd-MM-yyyy");


Output would be:- 24-12-2013


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response