Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Using Formcalc to calculate Days between Dates

J_Rizz
Level 2
Level 2

Can anyone give me a simple FormCalc script in which an end date is subtracted from a start date and the result is expressed in number of days?  I'm using LiveCycle Designer ES (not ES2).  Thank you!

1 Reply
SaketSidana
Employee
Employee

Use the following FormCalc script:

var numDays;

numDays = Date2Num("21/5/2012", "DD/M/YYYY") - Date2Num("19/5/2012", "DD/M/YYYY");

For more details on FormCalc scripting, pelase refer to: http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf