Today date format needed dd/mm/yyyy

Hi,

Need code for today date with format DD/MM/YYYY

current code
var d=new Date(); return d.getDate() + ‘/’ +((d.getMonth()+1))+’/’ +d.getFullYear();
coming as D/M/YYYY

Please help to get today date with format DD/MM/YYYY

Here the solution

{
“Name”: “Test”,
“CreationDate”: “2021-8-1”,
“Commands”: [
{
“Command”: “executeScript_Sandbox”,
“Target”: “var d = new Date();var m = ((d.getMonth()+1)<10) ? “0” + (d.getMonth()+1):(d.getMonth()+1);var day=d.getDate()<10 ? “0” + d.getDate():d.getDate();return day + “/” + m + “/” + d.getFullYear();”,
“Value”: “Date”,
“Description”: “”
}
]
}