This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-15. For the latest, interactive version please visit https://mariadb.com/kb/.

Select data using between dates

Hi,

Would like to know should below query return data for 2018-12-12? Because I only can see the data till 12-11.

Select * from ib_jobs_v where createddate between '2018-12-06' AND '2018-12-12';

Thanks

Answer Answered by Ian Gilfillan in this comment.

It depends on the data/types. If there's a time component the query you provide will return values until 2018-12-12 00:00 - any time component after that hour/second, such as 2018-12-12 03:20, will then not be returned. See examples at BETWEEN AND.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.