Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compare timespan value with double

Status
Not open for further replies.

scottaherbst

Technical User
Jan 18, 2007
46
US
I have two variables in a program I am working on. One is a double, the other a timespan. I want to compare whether one is greater than the other.

However, I am having trouble converting a double to a timespan and a timespan to a double (either of which would work for me). Any suggestions?
 
Hi,

Depending on what you need (minutes, hours, seconds) you need to compare the double value with for example the TimeSpan.TotalMinutes property.

Here is a list of all the possible properties:
Note: if there is no total in the name, it means that only a fragment of the timespan is taken.

Greetz,

Geert


Geert Verhoeven
Consultant @ Ausy Belgium

My Personal Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top