Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rainbowliquor
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
rainbowliquor
8y ago
Actually I have an unpopular opinion in regards to your question on competency. The computing industry as a whole over the years has grown and morphed to the point that there’s a high level of ineptitude when it comes to basic administratio
2.
▲
by
rainbowliquor
9y ago
True but in the use case of OPs example. In the article OP says "So if we wanted to find the count of users that signed up per week:" which "2017-06-05 00:00:00+00" isn't a week, it's a date (with a time stamp
3.
▲
by
rainbowliquor
9y ago
date_trunc() is one way but to_char is even better as you can get the resulting output to something nicer. Doing: SELECT DATE_TRUNC('week', CURRENT_TIMESTAMP); gives: 2017-06-05 00:00:00+00 vs: SELECT TO_CHAR(CUR