I am writing this code but it seems I don't get the result I want. This is a Real Time Clock.
<p id="time"></p>
<script type="text/javascript">
function updateTime(){
$('#time').html(new Date());
}
$(function(){
setInterval(updateTime, 1000);
});
</script>
This is the Result:
Tue Aug 15 2017 13:34:09 GMT+0800 (China Standard Time)
How Can I format the Date and Time to this: "Tue August 15, 2017 1:30pm"