Hello all, I am very new to scripting and trying to find a way to create separate records for all dates within a range of two dates, a start and an end. I found this code online but it is not working, I am completely new and just wondering what needs to be added before in order for this to work with Airtables
var fromDate = new Date(inputData.from);
var toDate = new Date(inputData.to);
var output =[];
var i = 1;
do {
var useDate = new String(fromDate.toISOString())
output.push(useDate);
console.log(fromDate);
fromDate.setDate(fromDate.getDate() + 1);
i++
}
while (fromDate <= toDate);
console.log(output);
return{output};




