在mysql中查找给定日期的下个月 [英] Find the next month for given date in mysql
问题描述
在表格中找到创建日期的COUNT(下个月+ 2DAYS下个月)
如何使用mysql查询执行此操作 查询数据类型为date和datetime的需求
如果只需要MONTH,则使用SELECT MONTH('2011-03-28' + INTERVAL 1 MONTH)
DATE和DATETIME的工作原理相同(用您自己的SQL和列名替换我引用的实际日期).有关更多信息,请参考 http://dev.mysql.com/doc/refman/5.1 /en/datetime.html
Find the COUNT(next month Between next month +2DAYS) for the created date in table(including Year wise Dec ,Jan like)
How to do this using mysql query Query need for both datatype date and datetime
If you only want the MONTH, then use SELECT MONTH('2011-03-28' + INTERVAL 1 MONTH)
Works the same for DATE and DATETIME (replace the actual date I quoted with your own SQL and column name). For more info you can refer to http://dev.mysql.com/doc/refman/5.1/en/datetime.html
这篇关于在mysql中查找给定日期的下个月的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!