Answer: Using DateTime format,we can convert given date to any format.We have to pass format in ToString method of DateTime class as dd-MM-yyyy.
For Example:-
string dt = Convert.ToDateTime(date).ToString("dd-MM-yyyy");
Output would be :- 24-12-2013
Asked In: Many Interviews |
Alert Moderator