ODBiC Discussion Board


Matthematics with large numbers

by David Richardson, August 16, 2009 13:05

Hi again,

I'm doing some work with javascript graphs at the moment, which means I need to convert dates into milliseconds since 1/1/1970. Now I can do this fine using mysql and UNIX_TIMESTAMP and FROM_UNIXTIME.

*However* which I want to get the date in milliseconds I multiply by 1000 in the select statement. When I want to get it back to unixtime I need to use ODBScript to divide by 1000. And it's just not doing it.

SET queryday date in milliseconds 
[43:SET queryday="1235433600000" ]
SET querydaya=$queryday$/1000
[44:SET querydaya="-1516981.248" ]

I read elsewhere in the board that there's an issue with big numbers: am I falling foul of it?


Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 

          


Copyright ©1997-2003, Roger Harris. All rights reserved.