string date = yourDateTime.ToShortDateString();
xxxxxxxxxx
DateTime dateTime = DateTime.Now; // Replace with your DateTime object
DateTime dateOnly = dateTime.Date; // Extracts the date portion
Console.WriteLine(dateOnly); // Outputs only the date portion