Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi Paul. Would you please send me your document? Thanks! michael.murphy3@usdoj.gov
Views
Replies
Total Likes
A similar sample is posted on this thread.
Views
Replies
Total Likes
I assume that Steve's sample will do the trick for you.....if not let me know and I will post mine.
Paul
Views
Replies
Total Likes
Thank you Steve, and thanks for the follow up Paul! I was looking for a Javascript solution since we decided to standardize on Javascript a while ago. I
googled around and found something similar to the following:
if
(!tripDateFrom.isNull && !tripDateTo.isNull)
{
var dateString, dateSplit, dateParse;
dateString
= tripDateFrom.rawValue;
dateSplit = dateString.split("-");
dateParse = dateSplit[0] + "/" + dateSplit[1] + "/" + dateSplit[2];
var FromDate = Date.parse(dateParse);
dateString = tripDateTo.rawValue;
dateSplit = dateString.split("-");
dateParse = dateSplit[0] + "/" + dateSplit[1] + "/" + dateSplit[2];
var ToDate = Date.parse(dateParse);
this.rawValue = Math.round((ToDate.valueOf()-FromDate.valueOf())/(1000*60*60*24));
if (ToDate.valueOf() <= FromDate.valueOf())
{
xfa.host.messageBox("Your Trip Date From must occur before your Trip Date To.", "Date Error", 0, 0);
this.rawValue = 0;
}
}
This seems to work, even with month and year changes. I was hoping to replace a few statements in there with the String.split() method, but haven't tried yet. If you guys strongly recommend FormCalc, I'm happy to break our rule.
Views
Replies
Total Likes
Dealing with Dates is the only time that I use FormCalc (it is much easier).
Paul
Views
Replies
Total Likes