Full Version: Field in Table for Year
UtterAccess Discussion Forums > Microsoft® Access > Access Date + Time
moncoacp
I want to add a field in my table that automatically enters the year the record was created. I don't need the full date, just the year. How do I do that?

Rick
GroverParkGeorge
DatePart("YYYY",Date())

But are you really sure you want only the year?

You can always parse out the year from the full date if you need to use it in calculations or to display on reports, and having the full date value can have other benefits.

HTH
George
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.