减去月份和日期的mysql [英] Subtract month and day mysql
本文介绍了减去月份和日期的mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要用mysql减去1个月零4天,我看到了命令
DATE_ADD (NOW (), - 1 MONTH)
最适合1个月但1个月零4天,使用31天并不是每个月带来30、29、28的有效期.我不能加上31 + 4、30 + 4等.
I need to subtract 1 month and 4 days with mysql, I saw the command
DATE_ADD (NOW (), - 1 MONTH)
perfect for 1 month but for 1 month and 4 days, using 31 days is not valid for every month that some bring 30, 29, 28. I can not add 31 + 4, 30 + 4, etc.
推荐答案
使用 查看全文