How old am I?

You want to express an age in years given the dob (mm/dd/yyyy) and today's date.



[!]Separate year in the format mm/dd/YYY into component parts [/!]

[math show=f]birthdatemonth=[getchars

[math show=f]birthdateday=[getchars

[math show=f]birthdateyear=[getchars start=7][dob][/getchars][/math]

[showif [date %m]>[birthDateMonth]]
[math show=f]age=[date %Y]-[birthDateYear][/math]
[showif [date %m]<[birthDateMonth]]
[math show=f]age=([date %Y]-[birthDateYear])-1[/math]
[showif [date %m]=[birthDateMonth]]
[showif [date %d]=[birthDateDay]]
[math show=f]age=[date %Y]-[birthDateYear][/math]
[showif [date %d]>[birthDateDay]]
[math show=f]age=[date %Y]-[birthDateYear][/math]
[showif [date %d]<[birthDateDay]]
[math show=f]age=([date %Y]-[birthDateYear])-1[/math]


Top Articles:

Tips and Tricks

A list of user-submitted tips ...

Download WebDNA Applications

WebDNA applications...

AWS Raw WebDNA LAMP-Plus WebServer

Amazon Web Services (AWS) README for Machine Image ID...

WebDNA Modules

A list of the currently available modules...

WebDNA Libraries

A list of available libraries for WebDNA...

WebDNA reference

A list of all WebDNA instructions...

Related Readings:

How to setup CODA to work with WebDNA?

This page will show graphically how to setup CODA as a WebDNA partner :-)...

Setting a 30-minute Cookie

Configuring the expires time for a short-term cookie is tricky...

How to keep the text variable after a function has finished

By default...

Check the Federal Government's Social Security database

The script on the page will check the federal government's social security database...

PayPal gateway


Removing whitespace

How can I remove all whitespace entered by a user from an input box (ie card number)...