Q: Simple DateTime question!

  • Thread starter Thread starter Visual Systems AB \(Martin Arvidsson\)
  • Start date Start date
V

Visual Systems AB \(Martin Arvidsson\)

Hi!

I want to decrease the current date with lets say five days.
How do i do that? I Have been struggeling for a while but cant figuer it out

The code is like this.

DateTime myTime = DateTime.Now;
MessageBox.Show(myTime.ToShortDateString());

myTime.Decrease( <--- What should i do here, it pussles me)

Regards

Martin Arvidssson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top