mysql获取表中日期的年月日时分秒

时间:2023-03-10 01:59:58
mysql获取表中日期的年月日时分秒
SELECT year(callTheRollTime) from schedule_account      获取年

mysql获取表中日期的年月日时分秒

SELECT month(callTheRollTime) from schedule_account   获取月份
SELECT day(callTheRollTime) from schedule_account  获取日
SELECT date(callTheRollTime) from schedule_account  获取时间  2018-02-27
SELECT hour(callTheRollTime) from schedule_account  获取时
SELECT MINUTE(callTheRollTime) from schedule_account  获取分
SELECT second(callTheRollTime) from schedule_account 获取秒