piheshpi90 Posted February 1, 2011 Share Posted February 1, 2011 date in my database is save as (dd/mm/yyyy). now i want to create sql to search for activity for chosen month..how do i extract month from (dd/mm/yyyy) and include in sql? Link to comment https://forums.phpfreaks.com/topic/226298-extraxt-month-from-date/ Share on other sites More sharing options...
Pikachu2000 Posted February 1, 2011 Share Posted February 1, 2011 Dates should be in YYYY-MM-DD format in an appropriate type of field so you can use the native MySQL time adn date functions like: SELECT MONTH(`date_field`) . . . Link to comment https://forums.phpfreaks.com/topic/226298-extraxt-month-from-date/#findComment-1168126 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.