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!