mysql 取年、月、日、時間


select id, phone,time,year(time),month(time), DAY(time),TIME(time) from user where phone='xxxxxx' #分別取年、月、日、時間
select id, phone,time from user where phone='xxxxxx' #
select id, phone,time,year(time) from user where phone='xxxxxx' #分別取年
select id, phone,time,month(time) from user where phone='xxxxxx' #分別取月
select id, phone,time,DAY(time) from user where phone='xxxxxx' #分別取日
select id, phone,time,TIME(time) from user where phone='xxxxxx' #分別取時間


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM