These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Translate Excel to Adobe Script

paulaeddy
Registered: May 14 2010
Posts: 22

Hi, I have a formula in excel that I can't seem to translate to an adobe form. Here is the formula:
 
=IF((C6-C5)<95,C5,IF((C6-C5)<185,(EDATE(C6,-3)),IF(AND(C3<>1,(C6-C5)<366),(EDATE(C6,-9)),IF(C3=1,(EDATE(C6,-6)),(EDATE(C6,-12))))))
 
This is what it looks like:
 
C5 is Date Hired
C6 is Date of Evaluation
C3 refers to a position. AM is 1, all others are 2
 
I'm not sure what other information I need to offer. I'm at a complete loss. Thanks!
 

My Product Information:
Acrobat Pro 9.4.2, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
You do not have the 'EDATE' function in Acrobat JavaScript or LiveCycle Designer FormCalc. JavaScript has the 'get Month()' method for the 'Date' object. You get a formatted date to the the 'Date' object by using the 'util.scand()' method. Unless you want to write a lot of repetitive code, you could write a function to replicate Excel's 'EDATE' function in JavaScript.

George Kaiser