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

Date/Time Field

Birgit
Registered: Jul 9 2007
Posts: 2

Could someone give me the proper syntax in either FormCalc or JavaScript for the following calculation to be entered in a "Date/Time Field".

If the entered date is less than "the actual Date", display "the actual date" in the Date/Time Field.
If the entered date is higher than "the actual Date", display "the higher, the entered date" in the Date/Time Field.

Thank you for your help!

Birgit

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
In FormCalc one uses the "Date2Num()" funciton to get the number of days from the epoch date.

if (Date2Num(EnteredDate,"formatString") < Date2Num(Date()) then
EnteredDate = Date
endif

George Kaiser