I have Date object and would like it formated.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
This is the format I would like to be able to print
yyyy-mm-dd hh:mm:ss
2017-08-09 19:48:54
Whatever I try I can't get it to using console.log to print that. I allways get something like
Wed Aug 09 2017 19:48:54 GMT+0200 (Central Europe Daylight Time)
or
Wed, 09 Aug 2017 17:48:54 GMT
I do not need all that extra information embedded. If I create Date object and time is 19:53:00 and date is 2017-08-09 then I need just this 2017-08-98 19:53:00
How do I get that exactly? I need to send this to server just like that.