hourofday()hourofday()

返回一个整数,该整数表示给定日期的第几个小时Returns the integer number representing the hour number of the given date

hourofday(datetime(2015-12-14 18:54)) == 18

语法Syntax

hourofday(a_date)hourofday(a_date)

参数Arguments

  • a_datedatetimea_date: A datetime.

返回Returns

一天的 hour number (0-23)。hour number of the day (0-23).