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