Date Format and passing a value to it.
Posted: Fri Aug 22, 2008 10:44 am
Hi,
I need to display a date format as 12th August 2008 but am having problems applying this.
This will give me the present time echo date('jS F Y'); will do this but I need to apply this using the following variable.
($date = ‘2008-08-12’);
I have played with an array using
which gives me 12-08-2008 ie the correct European order but I’m stuck trying to pass $date or $dtt to date('jS F Y'); tried date('$date','jS F Y');?> but this is not working.
Any help would be great
I need to display a date format as 12th August 2008 but am having problems applying this.
This will give me the present time echo date('jS F Y'); will do this but I need to apply this using the following variable.
($date = ‘2008-08-12’);
I have played with an array using
Code: Select all
$dtt = explode('-', $date);
$dtt = $dtt[2]. '-'. $dtt[1] .'-' .$dtt[0];
echo $dtt;Any help would be great