你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
hourofday()
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Returns the integer number representing the hour number of the given date.
Syntax
hourofday(
date)
Learn more about syntax conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
date | datetime |
✔️ | The date for which to return the hour number. |
Returns
An integer between 0-23 representing the hour number of the day for date.
Example
print hour=hourofday(datetime(2015-12-14 18:54))
hour |
---|
18 |