Year Function

DateSerial āˇ„āˇ DateValue āˇāˇŠâ€āļģāˇ’āļ­āļēāļšāˇ’āļąāˇŠ āļĸāļąāļąāļē āļšāļŊ āˇāˇŠâ€āļģāˇšāļĢāˇ’āļœāļ­ āļ¯āˇ’āļąāļēāļšāˇ’āļąāˇŠ āˇ€āˇƒāļģāˇš āļ¸āˇāˇƒāļē āļ†āļ´āˇƒāˇ” āļŊāļļāˇāļ¯āˇ™āļēāˇ’.

āļšāˇāļģāļš āļģāˇ“āļ­āˇ’āļē:


Tan (āļ…āļ‚āļšāļē)

āļ†āļ´āˇƒāˇ” āļŊāļļāˇāļ¯āˇ™āļą āļ…āļœāļē:

Integer

āļ´āļģāˇāļ¸āˇ’āļ­āˇ“āļąāˇŠ:

Number: āļ­āļ­āˇŠāļ´āļģ āļœāļĢāļą āļœāļĢāļąāļē āļšāˇ’āļģāˇ“āļ¸āļ§ āļēāˇœāļ¯āˇ āļœāļąāˇŠāļąāˇ āļ…āļąāˇ”āļšāļ¸ āļšāˇāļŊ āļ…āļ‚āļšāļē āļ…āļŠāļ‚āļœāˇ” āˇƒāļ‚āļ›āˇŠâ€āļēāˇ āļ´āˇŠâ€āļģāļšāˇāˇāļąāļē.

This function is the opposite of the DateSerial function, and returns the year of a serial date. For example, the expression:


Print Year(DateSerial(1994, 12, 20))

returns the value 12.

Error codes:

5 Invalid procedure call

āļ‹āļ¯āˇāˇ„āļģāļĢāļē:


Sub ExampleYear
    MsgBox "" & Year(Now) ,64,"Current year"
End Sub

Please support us!