Calcular edad a partir de fecha de nacimiento

1,697 views
Skip to first unread message

minig

unread,
Jun 22, 2007, 10:02:03 AM6/22/07
to FileMaker-es
Un funcion muy sencilla para calcular la edad a partir de la fecha de
nacimiento:

If ( not IsEmpty ( FECHA_NACIMIENTO ) ; Int ( ( Get ( CurrentDate ) -
GetAsDate ( FECHA_NACIMIENTO ) ) / 365,25 ) ; "" )

SummuN

unread,
Apr 8, 2013, 5:56:19 PM4/8/13
to filema...@googlegroups.com
Lo mas correcto seria de la siguiete manera:

Year( Get( CurrentDate ) ) - Year( FechaNacimiento ) - 
If( 
Get( CurrentDate ) < 
Date( Month( FechaNacimiento ); Day( FechaNacimiento ); Year( Get( CurrentDate ) ) ); 

) 


//esto nos daria la edad con exactitud del dia en que se encuantra seteada la pc//
// y si queremos ver con cuantos dias y meses seria asi//

Year( Get( CurrentDate ) ) - Year( FechaNacimiento ) - 
If( 
Get( CurrentDate ) < 
Date( Month( FechaNacimiento ); Day( FechaNacimiento ); Year( Get( CurrentDate ) ) ); 

) & " años, " & 


Mod( 
Month( Get( CurrentDate ) ) - Month( FechaNacimiento ) + 12 - 
If( Day( Get( CurrentDate ) ) < Day( FechaNacimiento ); 1 ); 
12 
) & " meses, " & 


Day( Get( CurrentDate ) ) - Day( FechaNacimiento ) + 
If( 
Day( Get( CurrentDate ) ) < Day( FechaNacimiento ); 
If( 
Day( Get( CurrentDate ) - Day( Get( CurrentDate ) ) ) < Day( FechaNacimiento ); 
Day( FechaNacimiento ); 
Day( Get( CurrentDate ) - Day( Get( CurrentDate ) ) ) 

) & " dias" 

SummuN

unread,
Apr 8, 2013, 5:56:55 PM4/8/13
to filema...@googlegroups.com

Francisco Zapata

unread,
Sep 13, 2014, 12:29:37 AM9/13/14
to filema...@googlegroups.com
Gracias amigo SummuN!!!
Resolví tremendo rollo. Un millón...
Reply all
Reply to author
Forward
0 new messages