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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Benefits Eligibility Date Determination

Status
Not open for further replies.

bobsmallwood

Programmer
Aug 9, 2001
38
US
In our employee benefits application, we need a formula to find the first day of the third full month following the hire date. For example, if the hire date is 4/13/03 I need a formula that would return 7/1/03. Likewise, a hire date of 11/5/03 would return a date of 2/1/04. Anyone know how to do this?
 
try this:

var
hireDate date
beneDate string
endvar

hireDate = date("5/12/2003")

if numval(strVal(month(hireDate)+3)) > 12
then beneDate = strVal(month(hireDate)-9) + "/1/" + strVal(year(hireDate)+1)
else beneDate = strVal(month(hireDate)+3)+"/1/"+strVal(year(hireDate))
endif

view(beneDate)
Mac :)

"There are only 10 kinds of people in this world... those who understand binary and those who don't"

langley_mckelvy@cd4.co.harris.tx.us
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top