Jump to content
Sign in to follow this  
SM76

Extracting info from date fields

Recommended Posts

Mornin .. I was wondering if anybody knows a way to extract the four digit year from a date-field.

Reason I'm doing this is because I have a calculation that creates file references to images that have a file-name that includes that year ...

Appreciate the help ..

SM

Share this post


Link to post
Share on other sites

Year ( Datefield ) will extract the year.

If you have records going back to before year 1000, and you want to pad the result with zeros, use:

Right ( "0000" & Year ( Datefield ) ; 4 )

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.