getyear()
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.
Example
print year = getyear(datetime(2015-10-12))
year |
---|
2015 |
משוב
https://aka.ms/ContentUserFeedback.
בקרוב: במהלך 2024, נפתור בעיות GitHub כמנגנון המשוב לתוכן ונחליף אותו במערכת משוב חדשה. לקבלת מידע נוסף, ראה:שלח והצג משוב עבור