hi,
In how to code this one in C# ? I would like to subtract datetime variable in order to get day. sample below.
10/10/05 - 10/06/05 =4
10/10/05 - 10/10/05 = 0
thanks,
popskie
Printable View
hi,
In how to code this one in C# ? I would like to subtract datetime variable in order to get day. sample below.
10/10/05 - 10/06/05 =4
10/10/05 - 10/10/05 = 0
thanks,
popskie
Example :
Code:DateTime t1=new DateTime(2005,10,20);
DateTime t2=new DateTime(2005,10,25);
TimeSpan newdate=t2.Subtract(t1);
msg.Show(newdate.TotalDays.ToString());
thanks for the quick reponse it need very hury.