Show / Hide Table of Contents

Method FromTimeSpan

FromTimeSpan(TimeSpan)

Converts System.TimeSpan to TimeOnly. Only timespans between 0 and +24 hours are supported, and sub-second precision is lost.

Declaration
public static TimeOnly FromTimeSpan(TimeSpan timeSpan)
Parameters
Type Name Description
System.TimeSpan timeSpan

The TimeSpan to convert.

Returns
Type Description
TimeOnly

A new instance of TimeOnly.

Exceptions
Type Condition
System.ArgumentOutOfRangeException

Applies to

Platforms and versions
TargetVersions
.NET Framework200.4 - 200.8
UWP200.4 - 200.8
In This Article
Back to top Copyright © 2022 Esri.