Jump to content

getting rows in particular week of the current month of the current year


Vivid Lust

Recommended Posts

SELECT usuarioID, username, fechafin

FROM  `usr_usuarios`

WHERE DATE_FORMAT( fechafin,  '%y-%m-%d' )  BETWEEN DATE_FORMAT(

 

CURDATE( ) ,  '%y-%m-%d'

) AND DATE_FORMAT(

DATE_ADD(  CURDATE(

),  INTERVAL 35 DAY ) ,  '%y-%m-%d'

)

ORDER BY  `fechafin` ASC

LIMIT 10

MySQL ha dicho:

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''%y-%m-%d')Â

BETWEEN DATE_FORMAT(CURDATE(), '%y-%m-%d')Â

ANDÂ DATE_FORMAT(' at line 3

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.