HI Everybody,
i am using datetimepicker and i want to calculate previous date of date selected by user
please reply me as soon as possible.
DateTime Picker Date
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Rujuta133 reputationPosted Mar 22, 2010, 9:36 PM EDT
DateTime date = new DateTime();
date = DateTime.Now;
DateTime newdate = new DateTime();
newdate=date.Subtract(new TimeSpan(1,0,0,0));
Tru it, should work fine for you.....
Hirendra SisodiyaRank #258 · 9.8K reputationPosted Mar 22, 2010, 9:44 PM EDT
Use add days method for finding previous date
DateTime dt = default(DateTime);
dt = DateTimePicker1.Value.AddDays(-1);
thanks
Please mark as answere if you like my answere
ankush belorkar7 reputationPosted Mar 22, 2010, 9:54 PM EDT
Thank you very much
Hirendra SisodiyaRank #258 · 9.8K reputationPosted Mar 23, 2010, 3:07 AM EDT
for more information about it you can go to msdn :
http://msdn.microsoft.com/en-us/library/system.datetime.adddays.aspx
if my answere helps you please mark as answere
thanks