![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
18/07/2003, 20:17
|
![Avatar de Gerald](http://static.forosdelweb.com/customavatars/avatar36329_1.gif) | | | Fecha de Ingreso: julio-2003
Mensajes: 1.356
Antigüedad: 21 años, 7 meses Puntos: 2 | |
Mas facil es hacerlo con java script :D no te compliques espera que te busco el codigo lo tengo en una de mis webs:
Lo encontre dentro del codigo escribes esto
<SCRIPT language=JavaScript
src="fechayhora.js"></SCRIPT>
Luego abrimos el block de notas y copias este codigo ahi
days = new Array(
"Domingo","Lunes","Martes","Miércoles","Jueves","V iernes","Sábado"
);
months = new Array(
"Enero","Febrero","Marzo","Abril","Mayo","Junio"," Julio","Agosto","Septiembre","Octubre","Noviembre" ,"Diciembre"
);
function renderDate(){
var mydate = new Date();
var year = mydate.getYear();
if (year < 2000) {
if (document.all)
year = "19" + year;
else
year += 1900;
}
var day = mydate.getDay();
var month = mydate.getMonth();
var daym = mydate.getDate();
if (daym < 10)
daym = "0" + daym;
var hours = mydate.getHours();
var minutes = mydate.getMinutes();
var dn = "AM";
if (hours >= 12) {
dn = "PM";
hours = hours - 12;
}
if (hours == 0)
hours = 12;
if (minutes <= 9)
minutes = "0" + minutes;
document.writeln("<FONT COLOR=\"#cccccc\" FACE=\"verdana\" size=\"1\"> ",days[day]," ",daym," de ",months[month]," del ",year," - ",hours,":",minutes," ",dn,"</FONT><BR>");
}
renderDate();
y lo guardas como fechayhora.js
__________________ Solo por Hoy: Trataré de fortalecer mi mente. Estudiaré y aprenderé algo útil Hoteldipity Arte Caracol |