Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
Switch services using the Version drop-down list. Learn more about navigation.
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Returns the year part of the datetime argument.
Syntax
getyear(date)
Learn more about syntax conventions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| date | datetime |
✔️ | The date for which to get the year. |
Returns
The year that contains the given date.
Examples
The following example returns the year of the given date.
print year = getyear(datetime(2015-10-12))
| year |
|---|
| 2015 |