473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Seconds to Time

Does the .Net framework provide a method to convert seconds into a readable
time format?

Thanks,

D
Nov 17 '05 #1
2 8352
David,

You can use the static FromSeconds method to create a TimeSpan instance.
At that point, you can just use the ToString method to produce a string that
represents that amount of time (days, hours, minutes, seconds).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"david.pope" <dp***@nospam.satx.rr.com> wrote in message
news:en**************@TK2MSFTNGP14.phx.gbl...
Does the .Net framework provide a method to convert seconds into a
readable time format?

Thanks,

D

Nov 17 '05 #2
You the man!

Thanks,

D
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OE**************@TK2MSFTNGP15.phx.gbl...
David,

You can use the static FromSeconds method to create a TimeSpan
instance. At that point, you can just use the ToString method to produce a
string that represents that amount of time (days, hours, minutes,
seconds).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"david.pope" <dp***@nospam.satx.rr.com> wrote in message
news:en**************@TK2MSFTNGP14.phx.gbl...
Does the .Net framework provide a method to convert seconds into a
readable time format?

Thanks,

D


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: NotGiven | last post by:
Below is a good elapsed time function I found. However, I'd like to return total seconds instead of broken down into days, hours, minutes & seconds. In other words, I want "125" instead of "2...
6
by: Kription | last post by:
Hello, I am having a nightmare of a time getting seconds converted to hour-minute-seconds I have a third party application that outputs only in seconds since so if someone has been logged...
3
by: fred14214 | last post by:
I need to be able to enter an elapsed time into a text field. This time then needs to be converted into seconds and stored in a field in some table. The user will enter a time (format is...
3
by: nriesch | last post by:
In the documentation, the "Second" property of class DateTime is a value between 0 and 59. In UTC time, approximately every year of so, a leap second is added at 00:00:00 UTC, so as to account...
4
by: Dr John Stockton | last post by:
I'm starting a new thread, for clarity. I'm assuming that it's ECMA-262 3rd Edn (1999) that we should be using for Web pages; that 4th Edn (what's its present status? is it available?) is too...
4
by: PinkBishop | last post by:
Hello, I have a simple calendar scipt that ask for time of event input. While I like the time feature I do not like the fact that it displays with seconds included. Ex. Displays HR:MIN:SEC...
5
by: charlie strauss | last post by:
Below is a simple program that will cause python to intermittently stop executing for a few seconds. it's 100% reproducible on my machine. I'd be tempted to say this is a nasty garbage...
3
by: Paul McGuire | last post by:
I am doing some simple timing of some elements of Python scripts, and the simplest is to just call time.time() before and after key elements of the script: t1 = time.time() # do lengthy...
37
by: David T. Ashley | last post by:
I have Red Hat Enterprise Linux 4. I was just reading up about UTC and leap seconds. Is it true on my system that the Unix time may skip up or down by one second at midnight when there is a...
24
by: Joe, G.I. | last post by:
Hi all, I'm trying to generate about 50 numbers as milliseconds between 0 and 4 seconds and it's driving me crazy. Can anyone help out on how to do this? Any help much appreciated.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.