P
Peter
I have a script which gives me the current date and time. Works fine, but
how can I change the format to day, date, month, year?
For example
Currently it gives Saturday May 8, 2004
I would like Saturday 8 May 2004
<SCRIPT language=JavaScript><!--
var DayOfWeek = new
Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'
);
var MonthName = new
Array('January','February','March','April','May','June','July','August','Sep
tember',
'October','November','December');
var theDate = new Date();
document.write('<NOBR>' +
DayOfWeek[theDate.getDay()] + ' ' +
MonthName[theDate.getMonth()] + ' ' +
theDate.getDate() + ', ' +
(theDate.getYear() < 200 ? theDate.getYear() + 1900 :
theDate.getYear()) +
'</font></NOBR>');
//--></SCRIPT>
</h3>
Thanks
Peter
how can I change the format to day, date, month, year?
For example
Currently it gives Saturday May 8, 2004
I would like Saturday 8 May 2004
<SCRIPT language=JavaScript><!--
var DayOfWeek = new
Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'
);
var MonthName = new
Array('January','February','March','April','May','June','July','August','Sep
tember',
'October','November','December');
var theDate = new Date();
document.write('<NOBR>' +
DayOfWeek[theDate.getDay()] + ' ' +
MonthName[theDate.getMonth()] + ' ' +
theDate.getDate() + ', ' +
(theDate.getYear() < 200 ? theDate.getYear() + 1900 :
theDate.getYear()) +
'</font></NOBR>');
//--></SCRIPT>
</h3>
Thanks
Peter