monthofyear()
Returns the integer number from 1-12 representing the month number of the given year.
The
monthofyear()
andgetmonth()
functions are equivalent
Syntax
monthofyear(
date)
Learn more about syntax conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
date | datetime |
✔️ | The date for which to find the month number. |
Returns
An integer from 1-12 representing the month number of the given year.
Example
print result=monthofyear(datetime("2015-12-14"))
Output
result |
---|
12 |
الملاحظات
https://aka.ms/ContentUserFeedback.
قريبًا: خلال عام 2024، سنتخلص تدريجيًا من GitHub Issues بوصفها آلية إرسال ملاحظات للمحتوى ونستبدلها بنظام ملاحظات جديد. لمزيد من المعلومات، راجعإرسال الملاحظات وعرضها المتعلقة بـ