SQL 手册SQL 函数日期函数hour本页总览hourhourdescriptionSyntaxINT HOUR(DATETIME date)获得日期中的小时的信息,返回值范围从0-23。参数为Date或者Datetime类型examplemysql> select hour('2018-12-31 23:59:59');+-----------------------------+| hour('2018-12-31 23:59:59') |+-----------------------------+| 23 |+-----------------------------+keywordsHOUR