Trying to convert timespan value to decimal
Hello everyone,
I am trying to use a timespan value for calculating different values,
Like subtracting, dividing and multiplying with other decimal values but in vain.
Below is the code I used to arrive at the timespan value (no of days) between two dates.
DateTime endate = convert.ToDateTIme(transdate.Text);
DateTime startdate = convert.ToDateTIme(lastdate.Text);
TimeSpan Nodays = enddate.Subtract(startdate);
Int NumberOfDays = No.Days;
LabelNoOfDays.Text = NumberOfDays.ToString();
So am trying to use the value (number of days) in label "LabelNoOfDays.Text" but in vain
Any help will be appreciated.