i have a datepicker. i have found the difference between two dates using
DateTime startdate = frmdate_starttime.Date;
DateTime enddate = frmdate_endtime.Date;
TimeSpan ts1 = enddate.Subtract(startdate开发者_如何学Python);
now i want to multiply the timespan value with 10 hrs . but 10 hrs is in datatype int. how can i multiply the timespan value with int val.
If you multiply a time with a time, you would get a very strange unit like hours squared... I assume that you want to multiply the number of days in the time span by ten hours:
int hours = ts1.Days * 24 * 10
精彩评论