Chaabelasri E.
Chaabelasri E.

Reputation: 170

SQL Where condition

How can I build a filter on a date field in using a time interval

Where Data is in ]date1, date2] and [date3, date4[

Upvotes: 1

Views: 112

Answers (1)

thedev
thedev

Reputation: 2906

SELECT "column_name"
FROM "table_name"
WHERE "column_name" BETWEEN 'value1' AND 'value2'

with valid dates:

 where date between '2005-01-01' and '2005-01-31'

Upvotes: 3

Related Questions