I need help to display using the date_time function twice, the same sql


Please i need help in displaying the date like 4th july - 20th july, 2012 using the date_time() function. how do i do this? below is what i thought might work, but it didin't.

$query_rssynod = "SELECT syID, session, year, theme, venue,
                  DATE_FORMAT(startdate, enddate, '%d %b', '%d %b, %Y.') AS DATE
                 FROM synod";

Try this,

CONCAT(DATE_FORMAT(FROM_UNIXTIME(startdate), '%D %M'), ' - ', DATE_FORMAT(FROM_UNIXTIME(enddate), '%D %M %Y'))

basically DATE_FORMAT( ) accepts the date to be formatted and the format of the date.