mssakib Posted August 11, 2011 Share Posted August 11, 2011 Hi After doing some working with php dates i am getting my result is some numbers . like 1313120970 but i want it in HH.MM.SS here is the code i am using <?php $ft = date("H:i:s", $file["date"]); $ftime= $ft + strtotime("+8hours"); $ctime = $ftime - date("H:i:s"); echo $ctime; ?> Link to comment https://forums.phpfreaks.com/topic/244536-time-converstion/ Share on other sites More sharing options...
TeNDoLLA Posted August 11, 2011 Share Posted August 11, 2011 Not sure but if I get what you try to achieve... shoud be like this maybe $ft = $file["date"]; // If this is timestamp you get from db $ftime= $ft + strtotime("+8hours"); $ctime = $ftime - $ft; $ctime = date('H:i:s', $ctime); echo $ctime; Link to comment https://forums.phpfreaks.com/topic/244536-time-converstion/#findComment-1256063 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.