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

Milliseconds to TimeSpan

Hi group,

Is there an easy way to convert a long representing milliseconds
elapsed to a TimeSpan value?

Thanks,
Jan Roelof

Nov 16 '05 #1
3 13274
Jan Roelof de Pijper wrote:
Hi group,

Is there an easy way to convert a long representing milliseconds
elapsed to a TimeSpan value?


TimeSpan.FromMilliseconds !?

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp
Do you need daily reports from your server ?
http://sourceforge.net/projects/srvreport/
Nov 16 '05 #2
public TimeSpan
int days
int hours
int minutes
int seconds
int millisecond
)

so

TimeSpan timeSpan = new TimeSpan(0, 0, 0, 0, myMillisecondValue)

Nov 16 '05 #3
On Thu, 15 Apr 2004 07:45:11 +0200, Jan Roelof de Pijper
<jr**********@hotmail.com> wrote:
Hi group,

Is there an easy way to convert a long representing milliseconds
elapsed to a TimeSpan value?

Thanks,
Jan Roelof

Thank you both!

Jan Roelof

Nov 16 '05 #4

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

Similar topics

6
by: Steve | last post by:
I have a value that represents the time in milliseconds passed since 1970 00:00:00 GMT that I need to convert into a readable date e.g. 1092364211773 = 13/08/2004 03:30:00 GMT Is this easily...
4
by: JSmith | last post by:
I want to determine the elapsed time between two events. What is the best way to do this?
1
by: Jan Roelof de Pijper | last post by:
Hi group, Is there an easy way to convert a long representing milliseconds elapsed to a TimeSpan value? Thanks, Jan Roelof
3
by: DBLWizard | last post by:
Howdy, I have looked and don't see a straight forward way to calculate time differences in milliseconds. What I am wanting to do is benchmark or time how long things take. So I want to...
2
by: Daniel | last post by:
how to get the number of milliseconds between two System.DateTime objects
10
by: yaron | last post by:
Hi, I do i get the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. like in java System.currentTimeMillis() ? Thanks.
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: ucasesoftware | last post by:
i translate a C# funtion to VB.NET and i have this : Shared Function isAllDay(ByVal ap As Appointment) As Boolean Return ap.DateBegin.TimeOfDay = TimeSpan.Zero AndAlso ap.DateEnd.TimeOfDay =...
3
by: Mark | last post by:
I'd like to compare two datetime values in milliseconds. The datetime.compare method appears to show only seconds. Milliseconds of a datetime are available as a property of each datetime, but I...
8
by: Praveen | last post by:
how to convert DateTime.UtcNow.ticks to Milliseconds
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.