473,387 Members | 1,528 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,387 software developers and data experts.

convert the System.currentTimeMillis

Dear Gent

can help me convert the System.currentTimeMillis to VB.Net code , i
tried system.DateTime.Now.Ticks what is not even close.

--
AlZikan
Sep 5 '06 #1
2 5697
Hello, Ahmed!

AA can help me convert the System.currentTimeMillis to VB.Net code
AA, i tried system.DateTime.Now.Ticks what is not even close.

Sorry, code sample is in C#. IMO it will be easy to convert to VB code

TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1));
long timestamp = Convert.ToInt64(t.TotalMilliseconds);
return timestamp;

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Sep 6 '06 #2
Thanks

--
AlZikan
"Vadym Stetsyak" wrote:
Hello, Ahmed!

AA can help me convert the System.currentTimeMillis to VB.Net code
AA, i tried system.DateTime.Now.Ticks what is not even close.

Sorry, code sample is in C#. IMO it will be easy to convert to VB code

TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1));
long timestamp = Convert.ToInt64(t.TotalMilliseconds);
return timestamp;

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot
Sep 6 '06 #3

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

Similar topics

1
by: Num | last post by:
Hi all, I have to convert a J2EE date as a long ("Millis") in a .NET date as a long ("Ticks") In Java, currentTimeMillis, is the difference, measured in milliseconds, between the current time...
3
by: Alex | last post by:
Hello, I'm starting to spam this group..I need a function that is equal to this function in JAVA: System.currentTimeMillis(); that returns the difference, measured in milliseconds, between...
14
by: Me | last post by:
Hi all I am getting a really bizzare error on when I convert a string into a datetime: The code is : DateTime dt1 = Convert.ToDateTime("10 Sep 2005"); Console.WriteLine(dt1.Year);
4
by: Edwin Knoppert | last post by:
In my code i use the text from a textbox and convert it to a double value. I was using Convert.ToDouble() but i'm used to convert comma to dot. This way i can assure the text is correct. However...
1
by: neoedmund | last post by:
/** * Returns the current time in milliseconds. Note that * while the unit of time of the return value is a millisecond, * the granularity of the value depends on the underlying * operating...
9
by: AzenAlex | last post by:
Does anyone know what the C# equivalent of System.currentTimeMillis() would be?
2
by: Galil | last post by:
I have a subroutine I need to convert from vb.net 2005 to visual C++ ( .net 2005) The function only allows specific characters to be typed into a textbox. the backspace and 0 -9. Private Sub...
6
by: tak | last post by:
Hi. I have a client / server application, which the client will send the server a timestamp everytime when there is a transaction. The client is using Java, and it sends the timestamp using...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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...

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.