Posted By

heathbo on 05/07/14


Tagged


Versions (?)

DateTime


 / Published in: C#
 

How to get specific DateTimes

  1. var DateTime = DateTime.Now Will give a datetime object based on today's date and time.
  2.  
  3. DateTime.Now.AddDays(1) Will give a datetime object based on today's date + 1 day.
  4.  
  5. DateTime.Now.AddYears(1) Will give a datetime object based on today's date + 1 year.

Report this snippet  

You need to login to post a comment.