Ask Your Question

Database does not filter by timestamp

asked 2017-06-25 20:07:22 +0100

apara gravatar image

I am using LibreOffice When creating a query in the Database I entered the following:

SELECT `ts`, `serial`, `avg_ac_power_kw`, CURDATE( ) FROM `solar`.`line` AS `line` WHERE `ts` > CURDATE( ) ORDER BY 'ts'

And while when used in a column CURDATE( ) returns today's date, the WHERE clause does not appear to be acting on the constraint and earlier dates are returned.

As far as unconstrained, data is returning correctly. There are no issues with TimeZone conversions and those appear to be working correctly. The solar.line collection is constantly appended to, so if I query and order by latest timestamp, I see correct timestamps showing in the result.

So, the filter does not appear to be working. I have tried both MariaDB and MySQL JDBC drivers. The filtering works fine from SequelPro as well as MySQL WorkBench applications. So, I am not sure why this is not working from Libre Database product.

My eventual goal is to create this query in Database and use it as a source in the Calc.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-06-25 23:19:41 +0100

Ratslinger gravatar image

updated 2017-06-25 23:21:43 +0100

Not sure what JDBC version you are using. Had v5.1.36 installed and experienced no problem. downloaded & installed v5.1.41 and again no problem. I do, however, have a problem with this using a native connection. It has a problem recognizing the table data altogether.

Using connector from here.

Using MySQL Workbench v6.3 (Community) & MySQL Server v5.7.18

LO v5.3.2.2

If this answers your question please click on the ✔ (upper left area of answer).

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-06-25 20:07:22 +0100

Seen: 81 times

Last updated: Jun 25 '17