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? Quote Link to comment 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`) . . . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.