Add this template to your user page, with the year, month, and day your account was created. The year will be four digits, the month should be two digits, and the day should not start with a zero. If you don't know the day your account was created, see your preferences here.

Sample code Resulting infobox
{{User Wikipedian for | year=2001 | month=09 | day=18}}
This user has been on Wikipedia for 23 years, 1 month and 15 days.
{{User Wikipedian for | year=2001 | month=09 | day=18 | link=true}}
This user has been on Wikipedia for 23 years, 1 month and 15 days.
{{User Wikipedian for | year=2001 | month=09 | day=18 | diff=http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=newusers&user=&page=Example}}
This user has been on Wikipedia for 23 years, 1 month and 15 days.
{{User Wikipedian for | year=2001 | month=09 | day=18 | border=black | text=black | imgbg=grey | bgcolor=lightgrey}}
This user has been on Wikipedia for 23 years, 1 month and 15 days.
change