TimeSpan.FromHours(Variable) Method

Top 

Description

Creates a TimeSpan from a value of hours.

 

Timing Precision Mode

This page describes functionality in nanosecond timing precision mode.

 

Method Signature

TimeSpan.FromHours(

Variable hours)

 

 

Arguments

hours


Description:

The number of hours.

Units:

hr

Valid Range:

-87660000 ≤ hours ≤ 87660000

 

 

 

Return Value

Type:

timespan

Units:

day

 

 

Returns a TimeSpan representing the input number of hours.

 

Syntax

myTimeSpan1 = TimeSpan.FromHours(myVariable1);

 

 

See also

TimeSpan Object

TimeSpans Guide

Parsing Dates and Times