この記事は
書き方
固定値を指定する場合
- クエリの条件で日付の指定を直接書く場合は、末尾に
+09:00
を書けばOK
select * from users where created_at < '2020-01-01 00:00:00+09:00'
カラムを指定する場合
- カラムを指定する場合はdatetime関数で
Asia/Tokyo
を指定すればOK
select datetime(created_at, 'Asia/Tokyo') from users
終わりに
Why not register and get more from Qiita?
- We will deliver articles that match you
By following users and tags, you can catch up information on technical fields that you are interested in as a whole
- you can read useful information later efficiently
By "stocking" the articles you like, you can search right away
Sign upLogin