- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi,
Try this JavaScript function,
var Days = { Sunday : 0, Monday : 1, Tuesday : 2, Wednesday : 3, Thursday : 4, Friday : 5, Saturday : 6 };
function addWorkingDays(startDate, days)
{
var weekend = [Days.Saturday, Days.Sunday];
for (var currentDate = startDate; days > 0; currentDate.setDate(currentDate.getDate()+1))
{
if (weekend.indexOf(currentDate.getDay()) < 0)
{
days--;
}
}
return currentDate;
}
You need to pass in the startDate (as a JavaScript object) and the number of days.
You probably want to add it to the calculate event of the "Calculate Date" field.
Regards
Bruce
Views
Replies
0 Likes
Total Likes