473,473 Members | 1,723 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Converting a string to a TimeSpan

Hi,

I was wondering if someone could tell me how i can convert a value that's a
string into a TimeSpan?

Thanks,
Doug
Nov 16 '05 #1
1 3821
Hello

TimeSpan myTimeSpan = TimeSpan.Parse(myString);

Best regards,
Sherif

"Doug" <dk*******@hotmail.com> wrote in message
news:uR**************@TK2MSFTNGP10.phx.gbl...
Hi,

I was wondering if someone could tell me how i can convert a value that's a string into a TimeSpan?

Thanks,
Doug

Nov 16 '05 #2

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

Similar topics

1
by: Doug | last post by:
Hi, I was wondering if someone could tell me how i can convert a value that's a string into a TimeSpan? Thanks, Doug
2
by: Claire | last post by:
I need to interface to an MFC CArchive file created with Visual Studio 6. I've found some online sample code to translate an archived string into C# I now need to read in and translate a CTime...
4
by: M. Uppal | last post by:
How do i convert fraction to time in c#. I need to convert 0.25 to time. Excel does this by using Selection.NumberFormat = "h:mm:ss;@" of the Cell Format function. thanks, M. Uppal
2
by: Brian Shafer | last post by:
In vb 6 i had a something like result = CLng(UserDate) - CLng(MyDate) in vb.net I get an error "Value of tyep 'Date' cannot be converted to 'Long'. How do i get around this?
2
by: maflatoun | last post by:
Hi guys, How do I convert hours to ticks? Let's say I have 1000 hours and I want to convert it into ticks? Is a tick 1 second? Thanks Maz
2
by: Pat Brown | last post by:
I am pulling an integer value of the amount of seconds since 12:00 am from a SQL Server DB. I want to convert this integer into a formated string or datetime to display a legible time of day. Are...
13
by: sd00 | last post by:
Hi all, can someone give me some coding help with a problem that *should* be really simple, yet I'm struggling with. I need the difference between 2 times (Target / Actual) However, these times...
3
by: RicercatoreSbadato | last post by:
I'd like to print a TimeSpan variable in this way: 00:00:00 --hh:mm:ss (whitout the milliseconds) how can I do it?
3
by: si_owen | last post by:
Hi folks, I am returning a value from a db table, which is the number of mins. I need to convert this to hrs mins which I have done using the following code, and also displayed it in my grid: ...
5
by: Anders Borum | last post by:
Hi! While implementing a property manager (that supports key / value pairs), I was wondering how to constrain T to a struct or string type. Basically, I guess what I'm looking for is the common...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.