!!YBT - Years Between 

This operator takes the years between Operand 2 and Operand 3, and stores the result in Operand 1.    The value stored in Operand 1 will be either a positive or negative value. 

The number of months will be expressed as a fractional number.

;Statement:If an employee has worked for the company for more than 20 years as of January 1, and their anniversary is this pay, give a $1000 bonus and store the bonus in PC 980.

||Line||CMD||OT||Operand 1||OPER||OT||Operand2||OT||Operand3||If Goto||	Else GoTo
|00010|	LET|V|JAN 1 OF THIS YEAR|BY|$S|PERIOD-END-DATE	|  |  |00020|	
|00020|	LET|V|YRS SERVICE AS OF JAN 1|YBT|DB|EEM.HIRE_DATE|V|JAN 1 OF THIS YEAR|00030|	
|00030|	ANN|  |  |BD|DB|EEM.HIRE_DATE|  |  |00100|9999
|00100|	LET|PC|980|EQ|N|1000|  |  |99999|	
|99999|EXIT|  |  |  |  |  |  |  |99999|	
\\ 
|Line 00010| The beginning of the year is calculated to prevent having to maintain the UserCalc when the year changes. 
|Line 00020 |The years of service are calculated based on January 1. 
|Line 00030| Determined if the current pay period includes the anniversary of the employee’s hire date. 

In the example above, if the period end date is June 15, 2000 and the employee’s hire date is June 10, 1979, the employee would receive the $1000.00 bonus during this pay.    The number of years will be expressed in fractional numbers.


----
![Notes|Edit:Internal.YBT_OPERATOR] 	
[{InsertPage page='Internal.YBT_OPERATOR' default='Click to create a new notes page'}]