Difference between revisions of "Year"
Jump to navigation
Jump to search
m (Reverted edits by 176.8.90.7 (talk) to last revision by 194.84.116.138) |
|||
Line 1: | Line 1: | ||
− | Returns a numerical value, indicating the year of the specified | + | Returns a numerical value, indicating the year of the specified EasyLanguage Date. |
− | + | EasyLanguage Date is specified in the ''YYYMMdd'' format, where ''YYY'' is the number of years since 1900, ''MM'' is the month, and ''dd'' is the day of the month. | |
− | + | == Usage == | |
<syntaxhighlight>Year(YYYMMdd)</syntaxhighlight> | <syntaxhighlight>Year(YYYMMdd)</syntaxhighlight> | ||
− | Where: | + | Where: |
− | + | ||
− | ==== | + | :'''YYYMMdd''' - a numerical expression, specifying the date in EasyLanguage ''YYYMMdd'' format. |
− | + | ||
+ | == Notes == | ||
+ | * Use [[ELDateToDateTime]] to convert an EasyLanguage date format of ''YYYMMdd'' to a DateTime format. | ||
+ | * See [[FormatDate]] and [[DateToString]] to convert a DateTime format to a formatted string. | ||
+ | * [[DayOfWeek]] and [[DayOfMonth]] can be used to retrieve the respective day of the week or the month. | ||
+ | * See [[Month]] and [[Year]] to get the month of year. | ||
− | Year( | + | == Example == |
+ | <syntaxhighlight>Year(1080101)</syntaxhighlight> | ||
+ | Will return a value of 108, indicating the year of 2008. | ||
+ | <syntaxhighlight>Year(990605)</syntaxhighlight> | ||
+ | Will return a value of 99, indicating the year of 1999. | ||
[[Category:Date and Time Routines]] | [[Category:Date and Time Routines]] |
Latest revision as of 05:24, 3 April 2013
Returns a numerical value, indicating the year of the specified EasyLanguage Date.
EasyLanguage Date is specified in the YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is the day of the month.
Usage
Year(YYYMMdd)
Where:
- YYYMMdd - a numerical expression, specifying the date in EasyLanguage YYYMMdd format.
Notes
- Use ELDateToDateTime to convert an EasyLanguage date format of YYYMMdd to a DateTime format.
- See FormatDate and DateToString to convert a DateTime format to a formatted string.
- DayOfWeek and DayOfMonth can be used to retrieve the respective day of the week or the month.
- See Month and Year to get the month of year.
Example
Year(1080101)
Will return a value of 108, indicating the year of 2008.
Year(990605)
Will return a value of 99, indicating the year of 1999.