Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Correct, it would give the results from this exact moment in time to that same timestamp 7 days ago. Were you thinking it might give you up to say the start of the last week or something?


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 :)


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))




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: