Panupat
Panupat

Reputation: 462

select using "current_date" as criteria?

If I've been recording data with timestamp. How can I query for today's data? Something similar to this example.

SELECT * FROM table WHERE recorded_time = current_date;

Thanks

Upvotes: 0

Views: 104

Answers (1)

Amadan
Amadan

Reputation: 198388

DATE_TRUNC('day', recorded_time) = CURRENT_DATE

should do it.

Upvotes: 2

Related Questions