News for hackers. Stuff that matters.
Re:The Website Hacker News Is Afraid to Discuss by minimaxir on Wednesday March 26, 2025 @08:38PM (#43489180)
The data was retrieved from the public HN dataset on BigQuery: https://news.ycombinator.com/item?id=40644563

    SELECT
      id,
      title,
      url,
      FORMAT_TIMESTAMP("%Y-%m-%d %H:%m:%S", timestamp, "America/New_York") AS 
    submission_datetime,
      score,
      descendants as comments
    FROM
      `bigquery-public-data.hacker_news.full`
    WHERE
      type = "story"
      AND REGEXP_CONTAINS(url, r"daringfireball\.net")
    ORDER BY submission_datetime
Re:The Website Hacker News Is Afraid to Discuss by someothherguyy on Friday March 28, 2025 @02:47AM (#43502286)
Should be %H:%i:%S?
Re:The Website Hacker News Is Afraid to Discuss by minimaxir on Friday March 28, 2025 @12:38PM (#43507392)
%i is not an option. https://cloud.google.com/bigquery/docs/reference/standard-sq...

Looking it up it's only used in really old DBs.

...but that table reveals I should have used %M instead of %m. Whoops! Although in this particular case it doesn't make a difference. And apparently I can do "%F %X" instead of the whole string.

Re:The Website Hacker News Is Afraid to Discuss by someothherguyy on Saturday March 29, 2025 @12:59AM (#43512870)
Yeah, just looked wrong, didn't check the docs