hello all,
i am trying to calculate a arithmetic logic in asp.net 2.0 and C#. this is what i have
DateTime checkdate;
DateTime checkrundate;
int totweek;
double totdays;
checkrundate = checkdate.AddDays(-10);
totdays = (7 + 0.5);
// i want to calculate totweek as
// checkrundate / totdays.
// if i use like this
totweek = (Convert.ToInt32(checkrundate)/Convert.ToInt32(totdays));
// above gives an System.InvalidCastException: Invalid cast from 'DateTime' to 'Int32'
chkTest.Text = totweek.ToString();
how can i calculate totweek. totweek = checkrundate/totdays
thanks i appreciate it.
...
Go to the complete details ...