On 8/3/06, Penduga Arus <[EMAIL PROTECTED]> wrote:
On 8/1/06, Chris <[EMAIL PROTECTED]> wrote:
> Did you look at the link David sent you?
>
> http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html

thanks.. I manage to do that.. below is my solution. please advice if
there is any better solution

SELECT a017namaper, DATE_FORMAT(a017tkhlahir, '%e/%c/%Y') as a017tkhlahir,
MONTH(a017tkhlahir) as bulan, DAY(a017tkhlahir) as tarikh
FROM a017
MONTH(a017tkhlahir) BETWEEN MONTH(CURDATE())  and
MONTH(ADDDATE(CURDATE(), INTERVAL 7 DAY))
AND DAY(a017tkhlahir) BETWEEN DAY(CURDATE()) and
DAY(ADDDATE(CURDATE(),INTERVAL 7 DAY))
ORDER BY bulan, tarikh


I have notice problem with my sql statment above, when it  run on the
25th for the month which have 31 days the statment isnt valid anymore.
FYI my a017tkhlahir is in date format (yyyy-mm-dd)

Please advice.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to