I am working on a Joomla component for a story writing contest. I need the content sorted by month. I am not a complete idiot and I can sort the query by date created. 2006-10-25 22:40:47 However I need the results displayed as follows October 2006 (non linkable) -Story 1 -Story 2 -Sotry 3 November 2006 -story 1 -story 2 is this possible? The idea is that I will not have to recreate this every month.
Yea its possible. If the date is in the format $date="2006-10-25 22:40:47"; use $year=(explode('-',$date,2); //2 too keep only 2 pieces output of $year['0']=2006 output of $year['1']=10-25 22:40:47 just keep doing this and you'll get things how you need.
To actually format the date output you should also be able to use. $date="2006-10-25 22:40:47"; $output = date('F, Y', strtotime($date)); //should return 'October, 2006' PHP: