Converting Timespan to Decimal
Hi,
How to Convert TimeSpan to Decimal format, my code looks like this
TimeSpan ts = new TimeSpan();
ts = datetimepickerouttime.Value.TimeOfDay - datetimepickerintime.Value.TimeOfDay;
ts = ts.Subtract(TimeSpan.FromMinutes(30));
TextBox1.Text = Convert.ToDecimal(Convert.ToDecimal(ts.Hours) + (Convert.ToDecimal(ts.Minutes))).ToString("#.00");
Thanks in Advance,