473,405 Members | 2,154 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,405 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 13278
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
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...

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.