Query for specific date day

Hello! I am trying to query my database for entries with a specific date.

The format should be correct, but when I use the following clasuse 'timeArrived > ‘05/24/2023 23:59:59’ AND timeArrived < ‘05/26/2023 00:00:00’ I expected to get back whatever record that has the date 05/25/2023, but that wasn’t the case. Am I missing something?

Hi @Olve_Nordheim,

The expression uses slashes (‘‘), which can cause syntax errors or incorrect interpretation of strings.
Check this, if you use slashes then replace them with ('') regular quotes.

Regards
Nazar

I corrected the typos, but the server still responds with an empty body. I can provide some screenshots of my schema and records if that is of any help

hello @Olve_Nordheim

I have taken the query from your message and was not able to reproduce the issue

timeArrived > '05/24/2023 23:59:59' AND timeArrived < '05/26/2023 00:00:00'

Very strange. Is there a way to construct a where-clause that only checks the month, day and year while disregarding time entirely? Using the clause timeArrived >= ‘05-25-2023 00:00:00’ AND timeArrived <= ‘05-25-2023 23:59:59’ I get records for that date, but also some records for the next day. Could it be time zone difference that does this and how can I account for that?

Hi Olve,

Yes, you can create a where clause query using the DATETIME database functions from the following page in the documentation:
https://backendless.com/docs/rest/data_database_functions.html#datetime-functions

Regards,
Mark