I have a field named time_range and its a daterange type.
my table is called holidays. I want to get all users where currently in a holiday. How can I to this with daterange type ?
I tried this but not working.
SELECT time_range FROM holidays WHERE upper(time_range) > NOW() AND lower(time_range) < NOW()
New contributor
wepro01 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.