DateTime years
The user inputs a year, month, and day as a DateTime. I need to subtract timespan variables of years or months (the exact day doens't have to exist but the months and year must). But the timespan only supports all but these? Should I make my own class?
What is the calendar class used for?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

jamesRank #1,153 · 1.6K reputationPosted Oct 4, 2004, 3:51 AM EDT
jshepler59 reputationPosted Oct 5, 2004, 1:45 PM EDT
int years, months; DateTime input, lastYear, lastMonth; int years = 1; int months = 1; input= tbxDate.Text; lastYear = input.AddYears(-years); lastMonth = input.AddMonths(-months);