// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; namespace DT9 { public class Program { public static void Main(string[] args) { DateTime dt = DateTime.Now; Console.WriteLine(dt); DateTime donly = dt.Date; Console.WriteLine(donly); TimeSpan tonly = dt.TimeOfDay; Console.WriteLine(tonly); } } }