TimeSpan.TryParse(String, TimeSpan) Method

Top 

Description

Attempts to convert a string value into a TimeSpan value.

 

Timing Precision Mode

This page describes functionality in nanosecond timing precision mode.

 

Method Signature

TimeSpan.TryParse(

String seconds,


TimeSpan result)

 

 

Arguments

seconds


Description:

A decimal string representation of a TimeSpan in seconds.

 

 

result


Description:

The parse result.

Units:

s

 

 

 

Return Value

Type:

boolean

 

 

Returns 1 if string value was converted successfully, 0 if not.

 

Syntax

myVariable1 = TimeSpan.TryParse(myString1, myTimeSpan2);

 

 

See also

TimeSpan Object

TimeSpan.TryParse

TimeSpans Guide

Parsing Dates and Times