I know this is a MySQL list but ....

Personally being a php coder, I'd do it in php.

http://www.mysql.com/doc/en/Date_and_time_functions.html

---------------------
Jerry @
MetalCat.Net
---------------------

----- Original Message -----
From: "Melih Onvural" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 16, 2003 11:11 PM
Subject: date functions


> > Hi all
> >
> > i'm new to the SQL programming language and i was trying to play with
> > a date/time counter of sorts. I was trying to teach myself the various
> > date functions, but I feel like I've failed. I had a database with
> > birthdates in it, and I subtracted that from date in the Year()
> > function and then subtracted 1900. Someone told me this was really
> > sloppy so I was wondering what's a better method to find someone's >
age?
> >
> > Here's what I did
> >
> > Year(Date - BirthDate) - 1900
> >
> > (birthdate is the name of the field in the table)
> >
> > thanks,
> > melih
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to