proctk Posted March 1, 2008 Share Posted March 1, 2008 HI I have the the date and time stored in a mysql table field. How do I get just the time from the value. thank you Link to comment https://forums.phpfreaks.com/topic/93800-get-time-from-mysql-datetime-record/ Share on other sites More sharing options...
trq Posted March 1, 2008 Share Posted March 1, 2008 SELECT DATE_FORMAT(tstamp,'%r') AS stamp Link to comment https://forums.phpfreaks.com/topic/93800-get-time-from-mysql-datetime-record/#findComment-480639 Share on other sites More sharing options...
proctk Posted March 1, 2008 Author Share Posted March 1, 2008 hi here is what I got and I get an error message $qryGettitle = "Select * DATE_FORMAT(tstamp,date_posted) AS stamp FROM blog INNER JOIN blogtopics ON categoryID=catid any thoughts Link to comment https://forums.phpfreaks.com/topic/93800-get-time-from-mysql-datetime-record/#findComment-480643 Share on other sites More sharing options...
trq Posted March 1, 2008 Share Posted March 1, 2008 tstamp was the field name in my example. Help if you look at the manual for a function before using it. DATE_FORMAT() $qryGettitle = "Select * DATE_FORMAT(date_posted,'%r') AS stamp FROM blog INNER JOIN blogtopics ON categoryID=catid Link to comment https://forums.phpfreaks.com/topic/93800-get-time-from-mysql-datetime-record/#findComment-480652 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.