Remove time from GMT time format
I am getting a date that comes in GMT format, Fri, 18 Oct 2013 11:38:23 GMT. The problem is that the time is messing up the timeline that I am using. How can I strip out everything except for the actual date? Inanda Menezes Like this: var dateString = 'Mon Jan 12 00:00:00 GMT 2015'; dateString = new Date(dateString).toUTCString(); dateString = dateString.split(' ').slice(0, 4).join(' '); console.log(dateString); If you want to keep using Date and not String you could do this: var d=new Date(); //your date object console.log(new Date(d.setHours(0,0,0,0))); -PS, you don't need a new Date object,