Search the Community
Showing results for tags 'calculate age'.
-
Hi guys, I'me trying to get the age of a user that i have in my database based on the data type field in database. So in my database in tha data field i have 20.02.1989 Now i want to display the age of the user with a specific ID, i must mention that i want to display the age of all users that will be register in the database. How can i do that because i've tried a lot of things and not of them seems to be working. My code is below: $dateValue = "SELECT EXTRACT(YEAR FROM data_nasterii) FROM bonacuora_clients WHERE id='$id'"; $c=date('Y'); $varsta = $c-$dateValue; Thank you!
- 12 replies
-
- calculate age
- data field
-
(and 1 more)
Tagged with:
-
I have a script that outputs the birthyear in the dd.mm.yy format. Example 15.02.92. Does anyone have a clue how may i calculate the age against the current, autogenerated date? I just want the straight age. Not the Day/month. But i wouldnt mind if it does both. Thanks in advance. PS: This is the second topic i create on this new forums. Does it still use SMF? The "Textarea" which seems to be an iframe, and not a textarea is annoying me. I dont have the copy/paste menu when i right click in it. The undo option is also a bit screwy.