0

I am using the following code

<head>
<title>(Type a title for your page here)</title>
<script type="text/javascript">
function display_c(){
var refresh=1000; // Refresh rate in milli seconds
mytime=setTimeout('display_ct()',refresh)
}

function display_ct() {
var strcount
var x = new Date()
var x1=x.getMonth() + "/" + x.getDate() + "/" + x.getYear();
x1 = x1 + " - " + x.getHours( )+ ":" + x.getMinutes() + ":" + x.getSeconds();
document.getElementById('ct').innerHTML = x1;

tt=display_c();
} 
</script>
</head>

<body onload=display_ct();>
<span id='ct' ></span>

</body>
</html> 

Which works well and displays the date as 3/24/2016 - 18:0:42

Is it possible to change the format of the date to Sun, 3 Apr 2014 - 18:00:42

Jagdish Idhate
  • 7,513
  • 9
  • 35
  • 51
Pigsfoot
  • 51
  • 1
  • 6

0 Answers0