Return todays date, and subtract days

Assuming you don’t care about the time portion (this will return the datetime specified at midnight):

Assign YourDate = today.AddDays(-in_days)

Change today → now if you want the current hour/min/second included.

As for your second question, you should use System.DateTime. I’m not sure what the DateAndTime object is.

4 Likes