Convert ToString to time format C#
- by Michael Quiles
Time.ToString("0.0") shows up as a decimal "1.5" for instead of 1:30 how can I get it to display in a time format.
private void xTripSeventyMilesRadioButton_CheckedChanged(object sender, EventArgs e)
{
//calculation for the estimated time label
Time = Miles / SeventyMph;
this.xTripEstimateLabel.Visible = true;
this.xTripEstimateLabel.Text = "Driving at this speed the estimated travel time in hours is: " + Time.ToString("0.0") + " hrs";
}