How to extract only date part from date and time.

 Posted by Rajesh_Kumar on 1/19/2014 | Category: C# Interview questions | Views: 1783 | Points: 40
Answer:

Suppose i have Date value as

19/01/2014 12:15:36

And i want only 19/01/2014. So i will use ToString method of DateTime object to convert date into specific format as

dt.ToString("dd/MM/yyyy")


Output would be:19/01/2014


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response