LoginSignup
2

More than 5 years have passed since last update.

日付・時間を加算する

Posted at

TIMEDIFF - http://dev.mysql.com/doc/refman/5.1/ja/date-and-time-functions.html

たとえば明日の今なら

test.sql
SELECT DATE_ADD(now(),INTERVAL 1 DAY);

もっと短く

test.sql
SELECT now() + interval 1 day;

とも書ける。

dayとかyearとか。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2