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 Quote Link to comment Share on other sites More sharing options...
trq Posted March 1, 2008 Share Posted March 1, 2008 SELECT DATE_FORMAT(tstamp,'%r') AS stamp Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.