var x = new Date();
myVar = x.toString();
document.write(myVar);
// Sat Feb 14 2015 14:20:58 GMT+0100 (CET)
I want to remove the time <<14:20:58 GMT+0100 (CET)>>
var x = new Date();
myVar = x.toString();
document.write(myVar);
// Sat Feb 14 2015 14:20:58 GMT+0100 (CET)
I want to remove the time <<14:20:58 GMT+0100 (CET)>>
Try ...
var x = new Date()
var myVar = x.toDateString();
This will only provide the date ...
Documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString