Getting the Year

F

Fie

Hi...

was wondering if ne1 new the code to extract the year from the date
that the users enters... i know to get the month its Month:
Format([Date],"mmmm")


fiona
 
V

Van T. Dinh

Year() function will return the numeric year value of the date.

Alternatively, you can use DatePart with the interval argument "yyyy". This
will return a Variant of Integer sub-type.

You can use Format with "yyyy" also but this will return a String (of digits
representing the year), not a numeric value.
 
Top