BOFocus – Crystal Reports Tips – Tricks – Tutorials

Crystal Reports - Formulas

Listing employees length of service in months

The end result to the following formula will show the the length of service in months for an employee.

1. Create the following formulas and place in the detail section:

2. Create the first formula and name it Months:

DateDiff(“m”, {emp_basic_all.adj_service_date}, Currentdate)

3. Create the second formula and name it LOS:

Truncate(({@Months}/12), 0)

Place both formulas in the detail section to review the output.

Tagged , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

GET SOCIAL

QUICK TIP

When in the formula editor, Start out by typing the first charter of the function, press Ctrl-Space. The keyword auto complete will than show a list of the functions available beginning with the charter you typed in.

ADVERTISMENT