473,320 Members | 2,177 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,320 software developers and data experts.

formatting System.TimeSpan.

I have something of type System.TimeSpan.

The problem I am having is that it displays as
Days:Hours:Minutes:Seconds
e.g. 1:17:03:56
and I want it to display the days as hours.
e.g. 41:03:56.

I have been trying for an hour now and am brain dead.

Any takers ?
Nov 21 '05 #1
3 1263
Hi,

http://msdn.microsoft.com/library/de...tringtopic.asp

Ken
---------------------
"poppy" <an*******@discussions.microsoft.com> wrote in message
news:0f****************************@phx.gbl...
I have something of type System.TimeSpan.

The problem I am having is that it displays as
Days:Hours:Minutes:Seconds
e.g. 1:17:03:56
and I want it to display the days as hours.
e.g. 41:03:56.

I have been trying for an hour now and am brain dead.

Any takers ?
Nov 21 '05 #2
That may format output but does not perform any conversion
for days to hours.
-----Original Message-----
I have something of type System.TimeSpan.

The problem I am having is that it displays as
Days:Hours:Minutes:Seconds
e.g. 1:17:03:56
and I want it to display the days as hours.
e.g. 41:03:56.

I have been trying for an hour now and am brain dead.

Any takers ?
.

Nov 21 '05 #3
"poppy" <an*******@discussions.microsoft.com> schrieb:
I have something of type System.TimeSpan.

The problem I am having is that it displays as
Days:Hours:Minutes:Seconds
e.g. 1:17:03:56
and I want it to display the days as hours.
e.g. 41:03:56.


See (complete thread):

<URL:http://groups.google.de/groups?threadm=vo9i4158kqhhecghda9mf00b25tp69caat% 404ax.com>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4

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

Similar topics

1
by: Doug | last post by:
Is it possible there is a bug with the System.TimeSpan object in .NET? I am using it to track times and am seeing an unusual situation. From what I understand, there are 1000 milliseconds in a...
3
by: Ivan A. | last post by:
Hi! Why I can't serialize TimeSpan structure with XmlSerializer? This is what I do: using System; using System.IO; using System.Xml; using System.Xml.Serialization;
5
by: Deiussum | last post by:
I'm running into an issue where I have a timer that appears to be timing out immediately, when it shouldn't be timing out for about int.MaxValue milliseconds. I have written a small app that...
1
by: Tales Normando | last post by:
Hi, How can I format a timespan to show only the hours, minutes and seconds? I don't really like how it adds the days information on the returned ToString() string. Tales
8
by: Ricky W. Hunt | last post by:
Is there a built-in function in VB.NET that will take a number of seconds (e.g. 243) and display it as: "04:03" (four hours, three minutes)? -- Thanks, Ricky W. Hunt freendeed
2
by: DWalker | last post by:
In Visual Studio (Visual Basic) .NET 2002, I noticed that this: Dim Elapsed as DateTime = Now - Now gives a "compile time" error (error in the IDE), saying that the '-' operator is not...
2
by: Mark | last post by:
I am running into a weird problem. I am using the following code: String.Format("{0:0}:{1:00}:{2:00}", Hours.ToString, Minutes.ToString, Seconds.ToString) Just say seconds is set to 1, it...
3
by: Horselover Fat | last post by:
Hi, I have a column in a database that holds elapsed time in milliseconds and I want to display that column in a DataGrid in a specific format (d.hh:mm:ss.fff). However, the closest I can get...
4
by: active T | last post by:
Is it possible to extend the system classes? I want to create a function for converting a DateTime into a TimeSpan. Any Ideas? at the moment i've created: public class Convert {
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.