We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

Database does not filter by timestamp [closed]

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

apara gravatar image

updated 2020-07-27 00:09:21 +0200

Alex Kemp 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 reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2020-07-27 00:09:45.659100

1 Answer

Sort by » oldest newest most voted

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

Ratslinger gravatar image

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

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

Question Tools

1 follower


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

Seen: 150 times

Last updated: Jun 25 '17