I am trying to convert today's date in particular format and this date format can be anything like - dd/mm/yyyy or yyyy.mm.dd and so on
var date = new Date();
var todaysDate = date.toString('mm/dd/yyyy');
However, this code is not working. Is there any other way to get it done.
I am looking for a common way where today's date can be converted to any given format