On Oct 31, 2004, at 6:26 PM, Geoff Perlman wrote:
When you assign the value to the TotalSeconds property, I believe it's
going override the day, month and year values you've assigned. I'm
surprised the values you are getting are so close together. That's
probably just a coincidence. Don't bother setting the day, month and
year properties. Instead, assign to TotalSeconds the number of seconds
between January 1st, 1904 (the base data for REALbasic dates) and
January 1st, 1970 (the base Java date) plus the milliseconds you
parsed converted to seconds.
That should do it.
That's IS what this should do
dte = new Date()
dte.Day = 1
dte.Month = 1
dte.Year = 1970
dte.Hour = 0
dte.Minute = 0
dte.Second = 0
// dte.totalseconds is the total number of seconds between Jan 1, 1904
and Jab 1, 1970
// and add the millis since 1970
dte.TotalSeconds = dte.TotalSeconds + Val(millis) / 1000
I'd bet you just need to make the division / 1000.0 to get this to work
out right
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|