steveangelis Posted July 20, 2008 Share Posted July 20, 2008 I looked and could not find any topics here that could help but I know it is something simple I am missing. When I leave the following out I get the unix time but when I put this in nothing gets returned: DATE_FORMAT(from_unixtime(topic_time),GET_FORMAT(DATE,'%m %d %Y')) I know the variable topic_time is there, it shows when I just query topic_time but when I add this it does not work. Any ideas? Quote Link to comment Share on other sites More sharing options...
steveangelis Posted July 21, 2008 Author Share Posted July 21, 2008 Does anyone know? Quote Link to comment Share on other sites More sharing options...
fenway Posted July 23, 2008 Share Posted July 23, 2008 That should be: DATE_FORMAT(from_unixtime(topic_time),'%m %d %Y') Quote Link to comment Share on other sites More sharing options...
steveangelis Posted July 23, 2008 Author Share Posted July 23, 2008 I am still getting a blank return on it. It shows up without the unixtime thing but when I add it in there is nothing. Quote Link to comment Share on other sites More sharing options...
fenway Posted July 24, 2008 Share Posted July 24, 2008 What column type is topic_time? UNSIGNED INT? What does FROM_UNIXTIME(topic_time) return? How are you determining that is it blank -- I don't see a column alias, are you running this from phpmyadmin? Also, apparently, FROM_UNIXTIME() takes an optional format parameter as the second argument, so you can do: FROM_UNIXTIME( topic_time, '%m %d %Y' ) Directly. 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.