pixeltrace Posted February 24, 2007 Share Posted February 24, 2007 guys, what is the sql query format for date let say i only want to display the month ex $sql = SELECT MONTH(date_posted) what code or syntax should i add so that the value will be in 3-letter text ? thanks! Quote Link to comment https://forums.phpfreaks.com/topic/39938-sql-query-format-for-date/ Share on other sites More sharing options...
paul2463 Posted February 24, 2007 Share Posted February 24, 2007 $sql = SELECT DATE_FORMAT(date_posted,'%b'); look here at the <a href="http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html"> mysql manual </a> Quote Link to comment https://forums.phpfreaks.com/topic/39938-sql-query-format-for-date/#findComment-193045 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.