Solarpitch Posted June 25, 2008 Share Posted June 25, 2008 Hey, I'm just looking to covert this timestamp "13:10" to this "01:30 pm" exactly. I'm not sure if I should be using strtotime function as the "13:10" is a time stamp itself? Link to comment https://forums.phpfreaks.com/topic/111831-solved-small-timestamp-question/ Share on other sites More sharing options...
thebadbad Posted June 25, 2008 Share Posted June 25, 2008 I'm sure you mean "13:10" -> "01:10 pm": <?php $time = '13:10'; $new_time = date('h:i a', strtotime($time)); echo $new_time; //01:10 pm ?> Link to comment https://forums.phpfreaks.com/topic/111831-solved-small-timestamp-question/#findComment-574048 Share on other sites More sharing options...
Solarpitch Posted June 25, 2008 Author Share Posted June 25, 2008 Yes I do lol. SIck of looking at times at this stage. Thanks, I'll give that a try. Link to comment https://forums.phpfreaks.com/topic/111831-solved-small-timestamp-question/#findComment-574050 Share on other sites More sharing options...
Solarpitch Posted June 25, 2008 Author Share Posted June 25, 2008 Perfect thanks! Link to comment https://forums.phpfreaks.com/topic/111831-solved-small-timestamp-question/#findComment-574051 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.