Well I figured out the basics of my previous problem in case any one wanted the info after a day of trial and error got basics to work but still not there. Took date subtraction method from the Acrobat samples on this site that were java script for acrobat couldnt get the java script in designer to work but got it in form calc which was much simpler. All i wanted to do was subtract two time/date feilds
So if your looking to do it here is the basic
var strStart = (field1.formattedValue, "DD/MM/YY")
var strEnd = (field2.formattedValue, "DD/MM?YY")
$ = strEnd-strStart
PLEASE HELP
But i cant get the freaking IF function to work in form calc not even the most basic one from the manual i get the same error every time. syntax error line 1 near '=' what am i doing wrong going nuts with this
In JavaScript you need to use the "util.scand()" method to the get the date time object and then use other methods to get the number of milliseconds or the parts of the object as needed.
For FormCalc the scripting help file in LiveCycle Designer list the "Date2Num()" function as the method to get the number of days from a date string.
var strStart = Num2Date(field1.formattedValue, "DD/MM/YY")
var strEnd = Num2Date(field2.formattedValue, "DD/MM?YY")
strEnd-strStart
George Kaiser