Select query Not working on Date+Time Column Type

I want to get the database record based on date and time value. It works with just date but if I pass the time with date or just the time, it fails.

Can you please identify what's wrong in the following query, it's returning 0 count although there is a record with the same value in the database, please find the screenshots attached.

Screenshot 2024-08-16 at 2.43.36 PM

Hello!

I think you need to format your date statement to match the timestamp format used by the Retool DB. Here I made a sample DB to query to hold a similar set of data:

image

You can see the return format of the date is TZ formatted so your query will likely need to be checking against that, like with:

image

If you wanted to include a component to pick date/times to search you can create the value in your query with something like:

image

Where the string inside of new Date('...') is the value from the component. Be aware of any time-zone offsets you may need to include.