<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yokoyantech</author_name>
  <author_url>https://blog.hatena.ne.jp/yokoyantech/</author_url>
  <blog_title>紙一重の積み重ね</blog_title>
  <blog_url>https://www.yokoyan.net/</blog_url>
  <categories>
    <anon>PostgreSQL</anon>
  </categories>
  <description>はじめに Railsのend_of_dayと同じことをpostgresで実現する必要があったのでメモ。 やりたいこと WHERE句にて、created_atを比較したい 前日の23:59:59までのデータをSELECTしたい 前日の23:59:59を取得するSQL SELECT DATE_TRUNC('day',NOW()) + '-1 second' あわせて読みたい 初日の取得、末日の取得、Nヶ月前の取得方法については、以前の記事を御覧ください。大体1年前に似たような記事を書いていたんだな・・・。 www.yokoyan.net</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.yokoyan.net%2Fentry%2F2019%2F11%2F13%2F170305&quot; title=&quot;【Postgres10】前日の最終日付（23:59:59）を取得する方法 - 紙一重の積み重ね&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/y/yokoyantech/20181112/20181112174646.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-11-13 17:03:05</published>
  <title>【Postgres10】前日の最終日付（23:59:59）を取得する方法</title>
  <type>rich</type>
  <url>https://www.yokoyan.net/entry/2019/11/13/170305</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
