Query with DateRange interpreted as int

Hey everyone! I've been trying to solve this problem for a few hours now but I can't figure it out. I have a Date Range component that I want to use as a filter for a query but when following the guides I get the "operator does not exist: timestamp without time zone >= integer" error. Tried to cast my timestamp to date and it didn't work and when casting the {{ dateRange1.value.start }} to date I get the cannot cast type integer to date.

My query looks like this:

My dateRange component looks like this:

Any idea on how could I solve this?


Welcome to the forum!

is v.created at a timestamp in the db? OR something else as far as a datatype is concerned?

Yep! It's a timestamp in the DB, I also found that when running

SELECT {{ dateRange1.value.end }}

I'm getting the math operation for the date (ex: for '2023-10-01' gives the in 2012) but I can't find a way to convert the '2023-10-01' to date or str

I think the issue may be the construction of the query:
AND (v.created_at >= {{dateRange.value.start}} AND v.created_at <= {{dateRange.value.end}})

Hey Scott! Thanks for replying! Already solved it with a partner by putting an additional ' ' to the component insertion like this:

Thanks again!


What db?

It's a postgresql connection :slight_smile: