You want to express an age in years given the dob (mm/dd/yyyy) and today's date.
numero = 45[date][text]dob=04/24/1964[/text][!]Separate year in the format mm/dd/YYY into component parts [/!][math show=f]birthdatemonth=[getchars start=1&end=2][dob][/getchars][/math]
[math show=f]birthdateday=[getchars start=4&end=5][dob][/getchars][/math]
[math show=f]birthdateyear=[getchars start=7][dob][/getchars][/math]
[showif [date %m]>[birthDateMonth]][math show=f]age=[date %Y]-[birthDateYear][/math][/showif][showif [date %m]<[birthDateMonth]][math show=f]age=([date %Y]-[birthDateYear])-1[/math][/showif][showif [date %m]=[birthDateMonth]][showif [date %d]=[birthDateDay]][math show=f]age=[date %Y]-[birthDateYear][/math][/showif][showif [date %d]>[birthDateDay]][math show=f]age=[date %Y]-[birthDateYear][/math][/showif][showif [date %d]<[birthDateDay]][math show=f]age=([date %Y]-[birthDateYear])-1[/math][/showif][/showif][age]
[date]
[text]dob=04/24/1964[/text]
[!]Separate year in the format mm/dd/YYY into component parts [/!]
[math show=f]birthdatemonth=[getchars
start=1&end=2][dob][/getchars][/math]
[math show=f]birthdateday=[getchars
start=4&end=5][dob][/getchars][/math]
[math show=f]birthdateyear=[getchars start=7][dob][/getchars][/math]
[showif [date %m]>[birthDateMonth]]
[math show=f]age=[date %Y]-[birthDateYear][/math]
[/showif]
[showif [date %m]<[birthDateMonth]]
[math show=f]age=([date %Y]-[birthDateYear])-1[/math]
[/showif]
[showif [date %m]=[birthDateMonth]]
[showif [date %d]=[birthDateDay]]
[math show=f]age=[date %Y]-[birthDateYear][/math]
[/showif]
[showif [date %d]>[birthDateDay]]
[math show=f]age=[date %Y]-[birthDateYear][/math]
[/showif]
[showif [date %d]<[birthDateDay]]
[math show=f]age=([date %Y]-[birthDateYear])-1[/math]
[/showif]
[/showif]
[age]
DOWNLOAD WEBDNA NOW!
WebDNA applications...
Technical Change HistoryThis Technical Change History provides a reverse chronological list of WebDNA changes...
WebDNA ModulesA list of the currently available modules...
WebDNA reference...
WebDNA LibrariesA list of available libraries for WebDNA...
Tips and TricksA list of user-submitted tips ...
reCAPTCHA helps prevent automated abuse of your site (such as comment spam or bogus registrations) by using a CAPTCHA to ensure that only humans perform certain actions...
WebDNA interaction with ImageMagickHow to pass variables to ImageMagick using a [shell] context?...
Removing whitespaceHow can I remove all whitespace entered by a user from an input box (ie card number)...
How to keep the text variable after a function has finishedBy default...
Find duplicate recordsFind duplicate records and do something with them...
Using a simple Array of Variables with [interpret]The [interpret] context is very powerful command in the hands of a skilled WebDNA programmer...