参考
http://homepage2.nifty.com/sak/w_sak3/doc/sysbrd/mysql_16.htm
■システム日付、システム時間
・current_timestamp() 関数は、システム日付(サーバ日付) を返す。
select current_date;
select current_time;
select current_timestamp;
select now();
select date_format(now(), '%y.%m.%d');
■日付切り捨て
select cast(substring(now(), 1, 10) as date);
■日付の差 (日付間隔、日付範囲)
・to_days() をうまく利用する。
(日付計算、日数計算、カレンダー計算)
select to_days(now()) - to_days('2015-02-10 00:00:00');
■日付の加算
・date_add を使用する。
(日付計算、日数計算、カレンダー計算)
select date_add(now(), interval 3 day);