TimeSpan.TruncatedToUnits(String) Method

Top 

Description

Returns the TimeSpan truncated to the specified units.

 

Timing Precision Mode

This page describes functionality in nanosecond timing precision mode.

 

Method Signature

TimeSpan.TruncatedToUnits(

String units)

 

 

Arguments

units


Description:

The units at which to truncate.

Valid Values:

Value

Label

"day"

days

"hr"

hours

"min"

minutes

"s"

seconds

"ms"

milliseconds

"us"

microseconds

 

 

 

 

Return Value

Type:

timespan

Units:

day

 

 

The value of the truncated TimeSpan.

 

Syntax

myTimeSpan1 = myTimeSpan2.TruncatedToUnits(myString1);

 

 

See also

TimeSpan Object

TimeSpans Guide

Parsing Dates and Times