• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

Need formula to count months of service

CRV10 - I need a formula that will give me months of service for each employee (as opposed to years of service). For example, if someone's hire date is 3/31/2004 then months of service would be 60, or if hire date was 1/5/2009 then months of service would be 3.  Thanks!
0
jph826
Asked:
jph826
  • 2
  • 2
1 Solution
 
Patrick MatthewsCommented:
Please define how you are counting months of service, because based on your example it is not clear.
0
 
mlmccCommented:
Crystal has a DATEDIFF function you can use

DateDiff('m',{HireDateField},CurrentDate)

mlmcc
0
 
Patrick MatthewsCommented:
mlmcc,

Right, but check the examples provided.  DateDiff would return 60 for the former, and 2 for the latter.  The question
lists 60 (OK) and 3 (difference).

Regards,

Patrick
0
 
jph826Author Commented:
matthewspatrick - Sorry, you are correct, 3 should have been 2.

mlmcc - Thanks!  Exactly what I needed.
0
 
jph826Author Commented:
Thanks again mlmcc!  I can always count on your answers to be right on - you have never steered me wrong.  Money well spent.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now