BillyBoB Posted December 17, 2006 Share Posted December 17, 2006 This worked before my host got switched idk if its me or not but i have my file as timestamp(14)http://dreamshowstudios.netthe news on there ^^ is where heres coding: [code]<?php$datefromdb = $row['whenposted'];$year = substr($datefromdb,0,4);$mon = substr($datefromdb,4,2);$day = substr($datefromdb,6,2);$hour = substr($datefromdb,8,2);$hour = $hour - 6;$min = substr($datefromdb,10,2);$sec = substr($datefromdb,12,2);$time = date("l F dS, Y h:i A",mktime($hour,$min,$sec,$mon,$day,$year)); echo '<center>' . $row['title'] . '<br />by ' . $row['poster'] . ' on ' . $time . ' CST<br />';echo $row['textmessage'] . '<br /><hr /></center>';?>[/code] Link to comment https://forums.phpfreaks.com/topic/30957-solved-mysql-timestamp/ Share on other sites More sharing options...
JP128 Posted December 17, 2006 Share Posted December 17, 2006 can you get on aim? My aim is Stropfo Link to comment https://forums.phpfreaks.com/topic/30957-solved-mysql-timestamp/#findComment-142851 Share on other sites More sharing options...
BillyBoB Posted December 17, 2006 Author Share Posted December 17, 2006 ok guys this is good i figured it out our time was saving with "-" " " and ":" so we just replaced them with "" so it fixed Link to comment https://forums.phpfreaks.com/topic/30957-solved-mysql-timestamp/#findComment-142861 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.