Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Using Formcalc to calculate Days between Dates

$
0
0

I received the following reply to my previous question, but need help applying it.

 

 

Use the following FormCalc script:

var numDays;

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

 

How do I apply in this situation?  I have a date field named "RehireDate" and a date field "SepDate."  I have a numeric field in which I want to subtract the RehireDate from the SepDate to get a specific number of days.  Do I substitute the dates in quotes above with my field names?  Also, how do I get the "DD/M/YYYY" date format?  I cannot find it in the Validation pattern. 


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>