
19/06/2002, 20:33
|
 | | | Fecha de Ingreso: mayo-2001 Ubicación: Frente al Monitor :þ
Mensajes: 995
Antigüedad: 24 años Puntos: 0 | |
Re: calcular edad automaticamente con fecha de nacimie colokas esta funcion:
Function Age (varBirthDate)
Dim varAge
If IsNull(varBirthdate) then Age = 0: Exit Function
varAge = DateDiff("yyyy", varBirthDate, Now)
If Date < DateSerial(Year(Now), Month(varBirthDate), _
Day(varBirthDate)) Then
varAge = varAge - 1
End If
Age = CInt(varAge)
End Function
'luego... en tu page...
fecha_nac = 'la fecha de nacimiento
Response.Write Age(fecha_nac)
<div align=right><embed src="http://www.jesusdaniel.venezuela.com/jd.swf" height=25 width=200 wmode="transparent"></embed><br>Usuario # 3359 en los foros</div> |