Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Formula Hire Date Days of 1 to 15 & 16 to 31

Status
Not open for further replies.

lsaunders1

Technical User
Aug 27, 2005
1
US
Using Crystal 8.5, MAS90 3.70
Current formula adds 90 days to the employee hire date and give me a paid leave available date as of the 1st of month.

Current Formula:
if {PR1_EmployeeMaster.HireDate}> date(2007, 6, 01)
then DATE(YEAR({PR1_EmployeeMaster.HireDate}+30*3),MONTH({PR1_EmployeeMaster.HireDate}+30*3),DAY({PR1_EmployeeMaster.HireDate}+30*3)-DAY({PR1_EmployeeMaster.HireDate}+30*3)+1)
else date(0000,00,00)

What I need is to only have current formula work for the hire date days of 1 to 15.

Then I need to have the following formula work for the hire date days of 16 to 31 to have a paid leave date of 90 days and the first of the following month.
DATE(YEAR({PR1_EmployeeMaster.HireDate}+30*4),MONTH({PR1_EmployeeMaster.HireDate}+30*4),
DAY({PR1_EmployeeMaster.HireDate}+30*4)-DAY({PR1_EmployeeMaster.HireDate}+30*4)+1).

I have been unable to get any date formula to work only for the hire date days wanted.

I would appreciate any help with this formula.

Thanks
Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top