How to put floating/Double value in Timespan?
Andy90 0 Light Poster
Recommended Answers
Jump to Postwell using
TimeSpan ts = new TimeSpan()
it only accepts ints, so you are going to have to convert your floats/doubles to ints
Jump to Postfloat x = 12.4f; int z = (int)x; //result //z == 12
or exactly as you have done
All 6 Replies
phoenix911 28 Junior Poster
kamilacbe 14 Junior Poster in Training
Andy90 0 Light Poster
phoenix911 28 Junior Poster
Andy90 0 Light Poster
thines01 401 Postaholic Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.