1 point

Display Date Objects in Shorter Format - MMM DD YYY HH:MM


dashboard

Sat Dec 14 2019 20:36:19 GMT+0000 (UTC)

Posted by @mishka #html #javascript

<p id="date-stamp">Sat Dec 14 2019 16:58:20 GMT+0500 (Pakistan Standard Time)</p>

<script>
        var dateStamp = document.getElementById("date-stamp");
        var date = dateStamp.innerHTML;
        var date2 = date.substr(4, 17);
        dateStamp.innerHTML = date2;
    
</script>
content_copy




LISTS WITH THIS SNIPPET

>> Browse more code snippets

more_vert