Home > database >  Solving kuayue are days of the date of the SQL statement how to write
Solving kuayue are days of the date of the SQL statement how to write

Time:10-04

In a date field in the database format for (date) (month) (year)
Use this field minus the current system time
To calculate the field in the database and the difference between the current system time
a few daysSuch as the difference between 2017-10-05 and 2017-10-05 the number of days to do
Datediff method is needless to say, I don't have this method mysql
Seek help from a great god, thank you

CodePudding user response:

DATEDIFF


.

CodePudding user response:


Junction post rate: 0%

When you the solutions of the problems please post.
http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html
http://topic.csdn.net/u/20100428/09/BC9E0908-F250-42A6-8765-B50A82FE186A.html
http://topic.csdn.net/u/20100626/09/f35a4763-4b59-49c3-8061-d48fdbc29561.html

8, how to give points and knot stick?
http://bbs.csdn.net/help#post_dispose

CodePudding user response:

SELECT DAY (LAST_DAY (' 2017-09-15 ') - DAY (' 2017-09-15 ') + DAYOFMONTH (' 2017-10-5 ')

CodePudding user response:

The select timestampdiff (day, '2017-1-1', '2017-2-1');
  • Related