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! 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> 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
Archived
This topic is now archived and is closed to further replies.