Gary Mack wrote:

Hi there,

I am having trouble converting a timestamp from mySQL to the US Format mm/dd/yyyy. Can someone please help. I am also having trouble converting yyyy-mm-dd into a normal mm/dd/yyyy format as well.


Normal format *is* yyyy-mm-dd.


I am using the following line of code:

date('m/d/Y', $row10['modified']);

$row10['modified'] is the timestamp from the mySQL database I want to convert from. Thanks in advance.


You want to use MySQL's date_format, eg:

date_format(modified, '%m/%d/%Y')

From memory anyway. Check the documentation.

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to