using System;
using System.Globalization;
public class DatesApp {
public static void Main(string[] args) {
DateTime dt = DateTime.Now;
Console.WriteLine(dt);
Console.WriteLine("date = {0}, time = {1}
",dt.Date, dt.TimeOfDay);
}
}
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok