Invalid floating point operation
Posted: Thu 29 Sep 2016 11:38
Hi
Using UniDac SQLite with Builder XE3
Table with schema
CREATE TABLE unix10and13 (dt int)
with the data as below:
1234345087123
The following query causes an invalid floating point operation exception
UniQuery1->SQL->Clear();
UniQuery1->SQL->Add("select DateTime(unix10and13.dt, 'unixepoch') AS converted FROM unix10and13");
UniQuery1->Execute();
with the data as below the same query works fine.:
1234345087
In an SQLite shell the same query produces an erroneous date but does not cause an error
sqlite> select * from unix10and13;
1234345087123
sqlite> select DateTime(unix10and13.dt, 'unixepoch') AS converted FROM unix10and13;
-1413-03-01 13:07:12
This occurs in 6.4.14, 6.1.3 and 5.5.11
Thank You
Using UniDac SQLite with Builder XE3
Table with schema
CREATE TABLE unix10and13 (dt int)
with the data as below:
1234345087123
The following query causes an invalid floating point operation exception
UniQuery1->SQL->Clear();
UniQuery1->SQL->Add("select DateTime(unix10and13.dt, 'unixepoch') AS converted FROM unix10and13");
UniQuery1->Execute();
with the data as below the same query works fine.:
1234345087
In an SQLite shell the same query produces an erroneous date but does not cause an error
sqlite> select * from unix10and13;
1234345087123
sqlite> select DateTime(unix10and13.dt, 'unixepoch') AS converted FROM unix10and13;
-1413-03-01 13:07:12
This occurs in 6.4.14, 6.1.3 and 5.5.11
Thank You