Posted By

stancox on 02/11/11


Tagged


Versions (?)

достает тех у кого ДР на каррент недели


 / Published in: SQL
 

  1. SELECT
  2. `student`.`FIRSTNAME`, `student`.`LASTNAME`, `student`.`BORN_DT`,
  3. FROM
  4. `student`
  5. WHERE
  6. NOW() > DATE(DATE_FORMAT(BORN_DT,CONCAT( EXTRACT(YEAR FROM NOW()), "-%m-%d")))
  7. AND NOW() < DATE_ADD(DATE(DATE_FORMAT(BORN_DT,CONCAT( EXTRACT(YEAR FROM NOW()), "-%m-%d"))), INTERVAL 7 DAY)

Report this snippet  

You need to login to post a comment.