Friday, February 17, 2017

Change DATE Format DDMMYYYY OR MMDDYY


Function to get DD MM YYYY  OR MMDDYY


function formattedDate(date) {
    var d = new Date(date || Date.now()),
        month = '' + (d.getMonth() + 1),
        day = '' + d.getDate(),
   year = d.getFullYear();
   if (month.length < 2) month = '0' + month;
   if (day.length < 2) day = '0' + day;
   return [day,month,year].join('/');
}

No comments:

Post a Comment

How to Deploy Your HTML Website on a Linux Server (Apache + SFTP)

Launching a simple HTML website on your own Linux server is easier than you might think. Whether you're sharing a static landing page or...