I have a DateTime object 2/19/2011 12:00:00 AM. I want to convert this object to a string 19/2/2011.
2/19/2011 12:00:00 AM
19/2/2011
Please help me to convert DateTime to
Here is a method, that takes datetime(format:01-01-2012 12:00:00) and returns string(format: 01-01-2012)
datetime(format:01-01-2012 12:00:00)
string(format: 01-01-2012)
public static string GetDateFromDateTime(DateTime datevalue){ return datevalue.ToShortDateString(); }