Newbies LSnyder Posted January 2, 2003 Newbies Posted January 2, 2003 I hope someone can help with this date calculation.. I have a "Hire date" and I want to calculation how long an employee has been employeed by "days, weeks, months, and years." Thanks alot in advance, Linda
kennedy Posted January 2, 2003 Posted January 2, 2003 EmployedInDays = Status(CurrentDate) - Hire Date EmployedInWeeks = EmployedInDays / 7 Beyond that, you'll have to precisely define what you mean by "months". Consider cases of either today or hire date being the 31st of a month or not, and the other being in months without a 31 (or 30, or 29). Do a search on "birthdate" in this and the ScriptMaker forums for a number of ways to compute "age" in years. Similar can be done for months... depending upon what is meant. Putting it all together is a matter of computing years, computing a new date exactly that many years, then months from that new date, and so on. HTH.
RussBaker Posted January 2, 2003 Posted January 2, 2003 Have a look at my attached file in the Handy Bits post in the Samples section of this forum. There are several treatments of duration intervals in the dates and times tabs.
Recommended Posts
This topic is 8066 days old. Please don't post here. Open a new topic instead.
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 accountSign in
Already have an account? Sign in here.
Sign In Now