Expand my Community achievements bar.

SOLVED

Date calculation....

Avatar

Level 4

I have a form that employees use to calculate their payroll deductions and one of the fields is "Hire Date". There is another field that is "Eligibility Date" which is 90 days from their date of hire. Is there a way to make the "Eligibility Date" field be a calculated field, to make it add 90 days to the hire date and display the resulting date? Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

in the calculate event use a script like this.

$.rawValue = Num2Date(Date2Num(HireDate.formattedValue, "MM/DD/YYYY") + 90, "MM/DD/YYYY")

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi,

in the calculate event use a script like this.

$.rawValue = Num2Date(Date2Num(HireDate.formattedValue, "MM/DD/YYYY") + 90, "MM/DD/YYYY")

Avatar

Level 1

thanks

Linda Coedy

Supervisor, IT Support Services

Purdue Pharma

575 Granite Court | Pickering, Ontario | L1W 3W8 | Canada

Telephone (905) 420-6400 ext. 285 | Facsimile (905) 420-7182

Avatar

Level 4

I can't seem to get it to work. I am guessing I select the field where the date with 90 days added will populate, then select the calculate function, use FormCalc. Do I need to change "$" to the name of the calculated field value?  Thanks!

UPDATE:

Nevermind, figured it out!