JavaScript date

Is it possible to display the date + X number of days?

Like for example the today date 4/10/23 + 10 days
So it shows 14/10/23

Duncan said I have to use JavaScript and a smart field but I have 0 knowledge Hahahah so i hope someone can give me a hint on what I should do.

Thanks in advance :slight_smile:

I have also no skills in JavaScript.
But ChatGPT shows me that:

// Get the current date
var today = new Date();

// Number of days to add to the current date
var daysToAdd = 10;

// Calculate the new date
var futureDate = new Date(today);
futureDate.setDate(today.getDate() + daysToAdd);

// Format the result (e.g., 'DD.MM.YYYY')
var day = futureDate.getDate();
var month = futureDate.getMonth() + 1; // Months are zero-based
var year = futureDate.getFullYear();

// Add leading zeros if necessary
if (day < 10) {
  day = '0' + day;
}
if (month < 10) {
  month = '0' + month;
}

// Print the formatted date
var result = day + '.' + month + '.' + year;
console.log(result); // Output: '14.10.2023'