dt.ToShortDateString();
var dateAndTime = DateTime.Now; var date = dateAndTime.Date; // or var dateAndTime = DateTime.Now; Console.WriteLine(dateAndTime.ToString("dd/MM/yyyy")); // or var dateOnlyString = dateTimeNow.ToShortDateString; //Return 00/00/0000 //or DateTime.Now.ToString("dd-MM-yyyy");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)