I have some code that I modified from a site which returns a date like this:
Mon Feb 20 2017 10:40:00 GMT+0000 (Hora padrão de GMT)
What I'm trying to achieve is to make it look like:
10:40
20-02-2017
Here's what I got:
<button onclick="document.getElementById('time').innerHTML=Date()">Click me to display Date and Time.</button>
<p id="time"></p>
I have tried with Date(hh:mm)
and Date(dd-mm-yyyy)
but it didn't worked.