View Single Post
Old Jun 4th, 2006, 11:44 PM   #2
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 710
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
I can't think of an alternative to what you have other than putting your year, month, day and minute into a variables and then comparing them. The statement you have isn't too bad. I would say go ahead and use it.

As for your second question. To subtract 10 minutes, there is no subtract method. Fortunately, there are AddYears, AddMonths, AddHours, etc.
You should be able to just do Addminutes(-10). Example:

date.AddMinutes(-10); //Subtracts 10 minutes

That's the way it's done in my book. That's how I remember it
Booooze is offline   Reply With Quote