I'm working with a hosted Feature Layer in ArcGIS Online. I want to have an attribute for a StartDate that defaults to the current date when a Feature is created. Then I want and attribute that is an EndDate and I want the EndDate to be 180 days from the StartDate. This is what I want the expression to say;
var startdate= Date($feature["StartDate"]);
var SixMonths= DateAdd($feature["EndDate"], 180, 'days');
How can I automatically populate the EndDate when the StartDate is Not Null?