Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6708 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

Looks aren't everything. Personality is important too... and be sure to have her home before midnight!

Sorry, I couldn't resist.

Posted (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 by Guest
Posted

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.

Posted (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 by Guest
Posted

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....

Posted

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/

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.