Hello i want to convert date to another format. below is what i tried and did not work:
$expirationdate = 22nd November 2021;
$newDate = date("'d\<\s\u\p\>S\<\/\s\u\p\> F Y", strtotime($expirationdate));
Thanks
Hello i want to convert date to another format. below is what i tried and did not work:
$expirationdate = 22nd November 2021;
$newDate = date("'d\<\s\u\p\>S\<\/\s\u\p\> F Y", strtotime($expirationdate));
Thanks
changr dateformat F to M
$expirationdate = '22nd November 2021';
echo $newDate = date('d M Y', strtotime($expirationdate));
if you need '22nd'
echo $newDate = date('dS M Y', strtotime($expirationdate));