I am not sure what mistakes I am making here but for some reason I cannot get %p to display AM or PM.
code:
$rep_date= date('D, d M Y - h:i %p', strtotime($overview[0]->date));
currently this displays Wed, 28 May 2014 - 08:27 %p . from my knowledge this supposed to work. any suggestions?
Thanks
%p
is not a valid format parameter for date()
. You need A
for "AM" or "PM" (or a
for "am" or "pm"):
$rep_date= date('D, d M Y - h:i A', strtotime($overview[0]->date));