Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000-Return Number of y/m/d based on hire in date

Status
Not open for further replies.
Apr 19, 2000
73
US
I have table with Employee name and Hire in date. I would like to create a query that would return the number of years,months, and days that the employee has been working since the hire in date.
Example: John Doe hired in Jan 1,1999. If today is Feb 1,2000 I want the results to read 1 year 1 month 0 days.
P.S. Thanks to all for the help in the past. I love this site!
 
Start new query. For one of the fields click in the field column then click on the Build button which is on the top toolbar. You can now create a calculation. You want it to read todays date - start date, so:
Length of employment: date() - [whatever name you gave to the start date field]

Im not sure what result you will get, but if you need to format it use:

length of employment: Format[blah blah]

sorry I dont have time to figure it all out, but if it doesnt work, repost and Ill figure it out later
 
Tried the Datediff in an expresion in the query but it only returns the a specific value (like years only) so if an employee were hired in for 2 yrs 6 months 3 days, the only result i get back is 2.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top