There seems to be a flaw in the myODBC driver 
02.50 when working with the Unix-Timestamp() 
function.

Apparently, the driver doesn't know which 
data-type to use...

When I send the sql statement:
--------------------------------------
Select 
        ( UNIX_TIMESTAMP(U.lastTime) - 
          UNIX_TIMESTAMP(D.prevTime)
        ) as dateDiff 
FROM ...
--------------------------------------

I get an empty recordset, but no Error-message.



When I change to ...
--------------------------------------
Select 
        concat( 
                  ( UNIX_TIMESTAMP(U.myTime) - 
                    UNIX_TIMESTAMP(D.latestDwnl)
                  )
                  , ' testDummy'  
        ) as dateDiff 
FROM ...
--------------------------------------

I get the results as to be expected

>>   1294572 testDummy 
>>    652223 testDummy 
>> -19864771 testDummy


This workaround would be complete if I could convert
this string to an integer.
Or is there a beter way altogether, to calculate the
difference between two dates? 
Not the same as the SUBDATE()-function, is it?


best regards,

bart






---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to