Getting the Year

  • Thread starter Thread starter Fie
  • Start date Start date
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top