Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/11/2003, 08:32
Avatar de lexus
lexus
 
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 años, 3 meses
Puntos: 4
hola,

si lo que buscas es mostrar solo los que cumplen años hoy entonces haz esto:

Código:
sql ="SELECT * FROM usuarios WHERE (day(fecha) = day(now)) and (month(fecha) = month(now))"
rs.Open eventquery, conn, 3, 3


y si lo que buscas es una funcion que te diga la edad de cada usuario automaticamente con esta:

Código:
<%
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
%>

<%
Dim fecha_nac, funcion
fecha_nac = rs("nacimientodia") & "/" & rs("nacimientomes") & "/" & rs("nacimientoano")
If fecha_nac <> "" Then
funcion = Age(fecha_nac)
End If
%>
<%=funcion%>

espero te sirva, me comentas como te fue
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com