0

I have two columns in my db, called start_date and end_date, which are both timestamps. I want to collect only the rows that meet the requirement: start_date <= current date and end_date > current date. Right now I have

.select("col1", "col2", "col3")
.where(col("start_date") <= current_date())
.where(col("end_date") > current_date() && col("end_date") =!= null)

but this returns nothing, which gives me a reason to believe I'm comparing timestamps incorrectly. Could anyone help with this? Thanks!

0 Answers0