Dating adds

6854933580_2c8b688306_z

Only the date parts of the values are used in the calculation.SELECT DATEDIFF('1997-12-31 ','1997-12-30'); --------------------------------------------------------- | DATEDIFF('1997-12-31 ','1997-12-30') | --------------------------------------------------------- | 1 | --------------------------------------------------------- 1 row in set (0.00 sec) These functions perform date arithmetic.

It's successfully launched thousands of happy and lasting relationships. For information on the INTERVAL unit argument, see the discussion for DATE_ADD().SELECT DATE_ADD('1998-01-02', INTERVAL 31 DAY); --------------------------------------------------------- | DATE_ADD('1998-01-02', INTERVAL 31 DAY) | --------------------------------------------------------- | 1998-02-02 | --------------------------------------------------------- 1 row in set (0.00 sec) mysql SELECT ADDDATE('1998-01-02', INTERVAL 31 DAY); --------------------------------------------------------- | ADDDATE('1998-01-02', INTERVAL 31 DAY) | --------------------------------------------------------- | 1998-02-02 | --------------------------------------------------------- 1 row in set (0.00 sec) SELECT ADDDATE('1998-01-02', 31); --------------------------------------------------------- | DATE_ADD('1998-01-02', INTERVAL 31 DAY) | --------------------------------------------------------- | 1998-02-02 | --------------------------------------------------------- 1 row in set (0.00 sec) SELECT ADDTIME('1997-12-31 .999999','1 1:1:1.000002'); --------------------------------------------------------- | DATE_ADD('1997-12-31 .999999','1 1:1:1.000002') | --------------------------------------------------------- | 1998-01-02 .000001 | --------------------------------------------------------- 1 row in set (0.00 sec) SELECT CONVERT_TZ('2004-01-01 ','GMT','MET'); --------------------------------------------------------- | CONVERT_TZ('2004-01-01 ','GMT','MET') | --------------------------------------------------------- | 2004-01-01 | --------------------------------------------------------- 1 row in set (0.00 sec) mysql SELECT CONVERT_TZ('2004-01-01 ',' ',' '); --------------------------------------------------------- | CONVERT_TZ('2004-01-01 ',' ',' ') | --------------------------------------------------------- | 2004-01-01 | --------------------------------------------------------- 1 row in set (0.00 sec) SELECT CURDATE(); --------------------------------------------------------- | CURDATE() | --------------------------------------------------------- | 1997-12-15 | --------------------------------------------------------- 1 row in set (0.00 sec) mysql SELECT CURDATE() 0; --------------------------------------------------------- | CURDATE() 0 | --------------------------------------------------------- | 19971215 | --------------------------------------------------------- 1 row in set (0.00 sec) CURRENT_DATE and CURRENT_DATE() are synonyms for CURDATE() Returns the current time as a value in 'HH: MM: SS' or HHMMSS format, depending on whether the function is used in a string or numeric context. SELECT CURTIME(); --------------------------------------------------------- | CURTIME() | --------------------------------------------------------- | | --------------------------------------------------------- 1 row in set (0.00 sec) mysql SELECT CURTIME() 0; --------------------------------------------------------- | CURTIME() 0 | --------------------------------------------------------- | 235026 | --------------------------------------------------------- 1 row in set (0.00 sec) SELECT DATE('2003-12-31 '); --------------------------------------------------------- | DATE('2003-12-31 ') | --------------------------------------------------------- | 2003-12-31 | --------------------------------------------------------- 1 row in set (0.00 sec) DATEDIFF() returns expr1 .“To try it, type in a quick search like, “jazz concerts in Austin,” or “art events this weekend” on your phone.I value good humor, laughter, meaningful conversations, playfulness, outdoorsy activities, compassion, and good health.When invoked with the INTERVAL form of the second argument, ADDDATE() is a synonym for DATE_ADD().

You must have an account to comment. Please register or login here!