Skuid Community,
In case anyone arrives here. Another option is a custom formula function. Here is the code for a Custom Formula Field function to add days to a date field:
skuid.formula.Formula (
‘ADD_DAYS’,
function (fieldName, daysToAdd) {
if(fieldName !== null && fieldName !== undefined ) {
if(daysToAdd===null || daysToAdd===undefined || daysToAdd===‘’) {
daysToAdd = 0;
}
var jsDate = skuid.time.parseSFDate(fieldName);
//add days
jsDate.setDate(jsDate.getDate() + daysToAdd);
//convert from Javascript date back to Salesforce date
return skuid.time.getSFDate(jsDate);
} else {
return null;
}
},{
namespace: ‘dateFunctions’,
numArgs : 2,
returnType : ‘date’
}
);
//
// Usage
// dateFunctions__ADD_DAYS({{Date_Field__c}}, 30)
// dateFunctions__ADD_DAYS({{Date_Field__c}}, {{daysToAdd}})
//
// Where’
// {{Date_Field__c}} is a field of type = DATE
// {{daysToAdd}} is a NUMBER or TEXT field represting the number of days to add
Thanks,
Bill