convert timestamp to date as text
Hi
I have manged to work out how to convert a timestamp to uk date
this outputs e.g 15-06-2011
but what I really need is to display 15-Jun-2011
Does any one know how I would code this?
Hi
I have manged to work out how to convert a timestamp to uk date
this outputs e.g 15-06-2011
but what I really need is to display 15-Jun-2011
Does any one know how I would code this?
use a capitol M to show a text string Month abbreviation:
<?php echo date('d-M-Y',strtotime($row_WADAmyTable["Date"])); ?>
see the php date manual page for more details:
function.date.php
Thanks once again Jason,
That is working perfectly
Hi Jason
Just one more quick question.
How would I write the code to get date and time so
16-Jun-2011 19:30
Thanks in advance
refer the php data manual page:
function.date.php
they list all of the parameters to pass in to get the format you want.
and:
so that would mean changing your code to:
<?php echo date('d-M-Y H:i',strtotime($row_WADAmyTable["Date"])); ?>
Hi Jason,
Thanks for this. That was the same code I had but I was missing one of the ending brackets thats why i thought I had it wrong.
Thanks for your help
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.