mysql 中 DATE
mysql SELECT '1997-12-31 23:59:59' INTERVAL 1SECOND; - '1998-01-01 00:00:00' mysql SELECT INTERVAL 1 DAY '1997-12-31'; - '1998-01-01' mysql SELECT '1998-01-01' - INTERVAL 1SECOND; - '1997-12-31 23:59:59' mysql SELECT DATE_ADD('1997-12-3123
mysql> SELECT INTERVAL 1 DAY + '1997-12-31';
mysql> SELECT '1998-01-01' - INTERVAL 1SECOND;
mysql> SELECT DATE_ADD('1997-12-3123:59:59',INTERVAL 1 SECOND);
mysql> SELECT DATE_ADD('1997-12-3123:59:59',INTERVAL 1 DAY);
mysql> SELECT DATE_ADD('1997-12-3123:59:59',INTERVAL '1:1' MINUTE_SECOND);
mysql> SELECT DATE_SUB('1998-01-0100:00:00',INTERVAL '1 1:1:1' DAY_SECOND);
mysql> SELECT DATE_ADD('1998-01-0100:00:00',INTERVAL '-1 10' DAY_HOUR);
mysql> SELECT DATE_SUB('1998-01-02', INTERVAL 31DAY);
mysql> SELECT DATE_ADD('1992-12-3123:59:59.000002',INTERVAL '1.999999' SECOND_MICROSECOND);
上一篇: php生手:自学后台管理系统中