Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
0 points
jontro
8y ago
0 comments
Share
Reading the end of the sentence "within the past week:" just above. However I would be interested to know if the "last week" date range is easily doable in postgres :)
undefined | Better HN
0 comments
default
newest
oldest
craigkerstiens
8y ago
Will try to clarify it a bit further. Offhand you could probably do something like the following to find if it fell within some week range:
created_at BETWEEN (date_trunc('week', now())) AND (date_trunc('week', now() - '1 week'::interval))
j
/
k
navigate · click thread line to collapse