TimeSpan.ToString() Method

Top 

Description

Converts a TimeSpan to a string containing a decimal number representation in units specified by the input argument. If no units are specified the value is returned in units of seconds.

 

Timing Precision Mode

This page describes functionality in nanosecond timing precision mode.

 

Method Signature

TimeSpan.ToString(

)

 

 

Return Value

Type:

string

 

 

A decimal string representation of the TimeSpan in units specified by the input argument. If no units are specified the value is returned in units of seconds.

 

Syntax

myString1 = myTimeSpan1.ToString();

 

 

See also

TimeSpan Object

TimeSpan.ToString

TimeSpans Guide

Parsing Dates and Times