View Single Post
Old 01-05-2013, 06:27 PM   PM User | #8
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,662
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Quote:
Originally Posted by minkoko View Post
Thanks mate ,now i see how to format the date for your kindness

and i just have one question about the time

can i formate the time like this 9:00 AM to 10:35 PM


Really thanks sunfighter
Those are the same format. 9:00 AM = 10:35 PM when it comes to the display format. MySQL uses a 24 hour clock, so display wise you can use PHP to interpret it as you see fit. Since you are using a datetime type in MySQL, php can take that an convert it easily with the datetime class.
PHP Code:
$dt = new DateTime($record['datetime']);
print 
$dt->format('F j Y g:i A'); // January 5 2013 12:27 PM 
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
minkoko (01-06-2013)