macmangler Posted July 12, 2006 Posted July 12, 2006 Hi... I was wondering where to begin with a few date equations which leads to 2 questions. First, I will post my question.... I have an employee database with start dates, etc. I would like to include how long an employee has been with the company.. either by number of days.. weeks and or years. I have a global date field of today to do the math against the start date, but not sure where to begin. Any advice is appreciated. Part 2... I searched the forum before I made the post...and I researched all Date functions as I was trying not to bother all you geniuses here. I realized.. I ask a lot of questions. Sorry... I am not trying tobe a pest... anyway, what are good approaches into researching an answer before a Post here? Thanks! Mike
Ted S Posted July 12, 2006 Posted July 12, 2006 Looks aren't everything. Personality is important too... and be sure to have her home before midnight! Sorry, I couldn't resist.
macmangler Posted July 12, 2006 Author Posted July 12, 2006 Well... I set myself up for that..... I'd have done the same thing.
comment Posted July 12, 2006 Posted July 12, 2006 (edited) Subttract the startDate (e.g. HireDate ) from endDate (e.g. today) to get the duration in days (set the result of the calculation to Number). Divide by 7 to get the result in weeks. As for years, it depends on what you call a year. BTW, your dating problems are nothing compared to relationship problems... Edited July 12, 2006 by Guest
Breezer Posted July 12, 2006 Posted July 12, 2006 It's kind of difficult to have a good relationship if you havent resolved the dating issues. Chris Moyer and Bob Bowers posted a good custom function which you can serenade to suit your needs. Use the hire date to be the birthdate and you are set. For a speed dating 101, try using this custom function. http://www.briandunning.com/cf/57 Happy dating.
macmangler Posted July 12, 2006 Author Posted July 12, 2006 (edited) My relationship is simple..... we both like the same things, perhaps I needed ( Today - Date hire ) to get my days...... i think not adding the ( ) gave me the unpredictable results I got to begin with. From the responses I got, I can only assume I was on the right track to begin with..... Today - Date hire = days From there.... divide by 7 to get weeks or 365 to get years I guess I was expecting a calc I never heard of before... like... superduper days(today - yesterday) = tomorrow ) Edited July 12, 2006 by Guest
macmangler Posted July 12, 2006 Author Posted July 12, 2006 OH... as for part 2 of my question.... 1) = Filemaker Pro Help (Look up functions) 2) = Search Forum 3) Post question on FMFORUMS.com Maybe I was on the righ track there as well....
comment Posted July 12, 2006 Posted July 12, 2006 Let me warn you against the custom function you have linked to. Ignoring for the moment the fact that the calculation itself is rather meaningless*, the author took upon himself to "improve" the formula, resulting in 1/1/2004 - 1/1/2003 returning "0 years and 0 months, and 0 days", for example. --- (*) See: http://fmforums.com/forum/showtopic.php?tid/137017/ http://fmforums.com/forum/showtopic.php?tid/150087/ http://fmforums.com/forum/showtopic.php?tid/166684 http://fmforums.com/forum/showtopic.php?tid/171817/tp/0/all/1/ http://fmforums.com/forum/showtopic.php?tid/175883/
macmangler Posted July 12, 2006 Author Posted July 12, 2006 Very nice find!! This is very very helpful! Thanks!!
Recommended Posts
This topic is 6708 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