Copy and paste the script below:
Code: Select all
var date = new Date();
// Get the day, month, and year
var day = ("0" + date.getDate()).slice(-2); // Add leading zero if needed
var month = ("0" + (date.getMonth() + 1)).slice(-2); // Add leading zero if needed, month is 0-indexed
var year = date.getFullYear();
// Combine parts in Dutch date format
var formattedDate = day + '-' + month + '-' + year;
//console.log(formattedDate);
results.html(formattedDate);