First out, chop off the first bit so you are left with this:
Your base query
|rex field=data_nascimento "(?<birthyear>\d+)-(?<birthmonth>\d+)-(?<birthday>\d+)"
| eval bdaythisyear=strptime(strftime(now(),"%Y")."-".tostring(birthmonth)."-".tostring(birthday),"%Y-%m-%d")
| eval lastbday=if(bdaythisyear>now(),strptime((tonumber(strftime(now(),"%Y"))-1)."-".tostring(birthmonth)."-".tostring(birthday),"%Y-%m-%d"),strptime(strftime(now(),"%Y")."-".tostring(birthmonth)."-".tostring(birthday),"%Y-%m-%d"))
| eval ageyear=tonumber(strftime(lastbday,"%Y"))-birthyear
| eval ageday=round((now()-lastbday)/86400)
Also you will need to change the regular expression in that part if your birthday format is not YYYY-MM-DD
... View more