
04/07/2004, 16:49
|
| | Fecha de Ingreso: abril-2004 Ubicación: México D.F.
Mensajes: 1.724
Antigüedad: 21 años Puntos: 4 | |
Ok Entendido!
<script language="vbs">
fecha1="02/03/1981" 'haha orharo's birthday
fecha2="04/07/2004"
x=datediff("m",fecha1,fecha2)
if( (datepart("d",fecha1)> datepart("d",fecha2)) and (datepart("m",fecha1)<= datepart("m",fecha2)) )then
x=x-1
end if
if((x/12)<1)then
meses=datediff("m",fecha1,fecha2)
anios=0
else
if(instr(x/12,".")<>0)then
anios=mid(x/12,1,instr(x/12,".")-1)
else
anios=x/12
end if
meses=x mod 12
end if
dias=abs(datepart("d",fecha1)- datepart("d",fecha2))
msgbox anios & " años"
msgbox meses & " meses"
msgbox dias & " dias"
</script> |