TimeSpan::TotalDays Property

 

Gets the value of the current TimeSpan structure expressed in whole and fractional days.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

public:
property double TotalDays {
	double get();
}

Property Value

Type: System::Double

The total number of days represented by this instance.

This property converts the value of this instance from ticks to days. This number might include whole and fractional days.

The TotalDays property represents whole and fractional days, whereas the Days property represents whole days.

The following example instantiates a TimeSpan object and displays the value of its TotalDays property. It also displays the value of each component (hours, minutes, seconds, milliseconds) that forms the fractional part of the value of its TotalDays property.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: