January 2, 200323 yr Newbies 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
January 2, 200323 yr 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.
January 2, 200323 yr 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.
Create an account or sign in to comment