middle ( id number ; 3 ; 2 )
& middle ( id number ; 5 ; 2 )
& middle ( id number ; 1 ; 2 )
I can help but notice that the id number in your example would be 1982-04-11, but I assume this is just a typo?
Your example is a little confusing. Shouldn't the birth day be 1982-04-11? Also, we do run into a little bit of a problem confusing centarians and young children. If a year is 15, should we assume that's 2015 or 1915? Something to think about.
Let's take out 100 year olds and we get this:
today = Get ( CurrentDate ) ;
ID = GetAsText ( table::ID NUMBER ) ;
y.tens = ( Left ( ID ; 2 ) );
y = GetAsNumber ( "20" & y.tens ) ;
m = Middle ( ID ; 3 ; 2 ) ;
d = Middle ( ID ; 5 ; 2 ) ;
this.cent.result = Date ( m ; d ; y ) ;
last.cent.result = Date ( m ; d ; y - 100 ) ;
result = If ( this.cent.result < today ; this.cent.result ; last.cent.result )
*The formatting for the date is up to you to set in the field display options.
thank! Ya it was typing error it was meant to be 04 not 05, this is how South Africa gives I'd number, will check if is working