<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>frozen_faithjp</author_name>
  <author_url>https://blog.hatena.ne.jp/frozen_faithjp/</author_url>
  <blog_title>mikami's blog</blog_title>
  <blog_url>https://mikamisan.hatenablog.com/</blog_url>
  <categories>
    <anon>rails</anon>
  </categories>
  <description>mysqlでマイクロ秒まで計算してくれるのは嬉しいのですが、保存されるときには切り捨てにされています。 Railsのend_of_dayを使うと、.9999になります。 where('start_at &lt;= ? and end_at &gt;= ?', date.beginning_of_day, date.end_of_day) SELECT `xxxx`.* FROM `campaigns` WHERE (start_at &lt;= '2019-09-28 15:00:00' and end_at &gt;= '2019-09-29 14:59:59.999999') LIMIT 11 ギリギリまでそれを…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmikamisan.hatenablog.com%2Fentry%2F2019%2F09%2F30%2F000628&quot; title=&quot;RailsのActive Recordのmysqlでマイクロ秒を切り捨てる方法 - mikami&amp;#39;s blog&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-09-30 00:06:28</published>
  <title>RailsのActive Recordのmysqlでマイクロ秒を切り捨てる方法</title>
  <type>rich</type>
  <url>https://mikamisan.hatenablog.com/entry/2019/09/30/000628</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
