DateDiff and Javascript getTime Methods help

G

Guest

I have this peice of Javascript, im trying to convert in to VB.net. Everything work ok. I almost get the some value, but the last 5 numbers are all Zeros on my VB out put. the Java version has numbers there and makes the out a little different. I want to know if there is a better why in VB i can do this

I am taking the difference of two dates and making them in to a long intger. here is the code for both and the out put

VB.net Code
Dim days As Lon
Dim date1970 As Date = "#1/1/1970 00:00:00#
Dim datenow As Date = Date.No
Dim mseconds As Long = 24 * 60 * 60 * 100

days = DateDiff(DateInterval.Day, date1970, datenow
days = days * msecond
Label1.Text = day
Output: 108587520000

Javascript
var unij = new Date()
var unii = "?"+unij.getTime()

function write()

document.write(unij)
document.write("<br>")
document.write(unii)


Out Put
Sun May 30 21:34:25 PDT 200
?108597806501

This number 1085978065010 should be the same as 108587520000
it's almost the some but i think because of the 5 zeros the value is differen

Thank you
Shane
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top