asp net date time now c# datetime.now code example Example: c# get current date DateTime now = DateTime.Now;