By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,635 Members | 911 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,635 IT Pros & Developers. It's quick & easy.

How to calculate years

P: 2
I would like for access to calculate how long someone has been working with the company based on their date of hire. Is there some way I can set it up so when I run my query it will look at their date of hire and give me a total years worked?
Mar 27 '12 #1
Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,409
Yes indeed. Have you considered using DateDiff()? This returns period values between any two dates - The date of joining and the Date() function which returns the current date would give what you need.
Mar 27 '12 #2

P: 2
Thank you NeoPa for assisting me with this. I have not tried this because I just started using Access and I know the basics of Access like creating tables, running queries and reports. If you don't mind can you walk me through how to set this up. I have a field on my table called DateHired and TerminationDate. Where would I put this formula to calculate the years?
Mar 28 '12 #3

NeoPa
Expert Mod 15k+
P: 31,409
Fundamentally, you put a formula in a calculated field in your query. More precisely is barely possible at this stage as your question leaves a great deal to be required as far as information and details go.

Why don't you include, with the further explanation of your situation, the SQL you currently have in your query. SQL can be found with the help of Extracting/Updating SQL from a QueryDef.
Mar 28 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.