SELECT x
FROM y WHERE DATEPART(n, date_from_table) = DATEPART(n, GETDATE())
it doesn't work..
i try to use CURDATE() instead of GETDATE() but it doesn't work either.
| SitePoint Sponsor |

SELECT x
FROM y WHERE DATEPART(n, date_from_table) = DATEPART(n, GETDATE())
it doesn't work..
i try to use CURDATE() instead of GETDATE() but it doesn't work either.





The mysql analog of DATEPART() is EXTRACT()
http://dev.mysql.com/doc/mysql/en/da...functions.html
Bookmarks