Current Datetime function in Javascript | Techbirds
Posted on: September 5, 2017 /
Categories: Mobile Applications
Posted on: February 4, 2014 /
Categories: PHP / Author Name: Diksha Verma
(Current Datetime) function in Javascript
function getCurrentTime()
{
var dt = new Date();
return dt.getFullYear()+”-”+(’0′ + (dt.getMonth()+1)).slice(-2)+”-”+ (’0′ + dt.getDate()).slice(-2)+” “+ (’0′ + dt.getHours()).slice(-2)+”:”+(’0′ + dt.getMinutes()).slice(-2);
}
428 total views, 2 views today
Share this On