Hi,
I think you can try to use TO_DAYS() function;
eg:
select TO_DAYS('2002-12-28')-TO_DAYS(NOW());
Regards,
Gelu
_____________________________________________________
G.NET SOFTWARE COMPANY
Permanent e-mail address : [EMAIL PROTECTED]
[EMAIL PROTECTED]
----- Original Message -----
From: "Patrascu Eugeniu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 2:56 PM
Subject: birthday calculation problem
> Hi,
>
> I have a problem calculating birthdays in sql. Here goes my setup:
>
> I have a database that contains the bithdays of a number of people, and
> I want to know when there birthday is to congratulate them.
> The thing is that I want to now that a day before their birthday.
> Therefore I need a way to do that, and I do not know how to do it, so I
> am asking on this list, maybe there is someone that can tell me how.
>
>
> Regards,
>
> Patrascu Eugeniu
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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