how to get current time and date in csharp code example Example: c# get current date DateTime now = DateTime.Now;