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 |
Pripomienky
https://aka.ms/ContentUserFeedback.
Pripravujeme: V priebehu roka 2024 postupne zrušíme službu Problémy v službe GitHub ako mechanizmus pripomienok týkajúcich sa obsahu a nahradíme ju novým systémom pripomienok. Ďalšie informácie nájdete na stránke:Odoslať a zobraziť pripomienky pre