flemingmike Posted September 28, 2010 Share Posted September 28, 2010 hello, i tried the following on a guess. how would i properly write the following? $start3='07:30AM'; $finish3='05:15PM'; $tstart1 = date( 'h:i', strtotime($start3) ); $tfinish1 = date( 'h:i', strtotime($finish3) ); Quote Link to comment https://forums.phpfreaks.com/topic/214650-strotime-question/ Share on other sites More sharing options...
flemingmike Posted September 28, 2010 Author Share Posted September 28, 2010 i forgot, the output im looking for is 07:30 17:15 Quote Link to comment https://forums.phpfreaks.com/topic/214650-strotime-question/#findComment-1116860 Share on other sites More sharing options...
DavidAM Posted September 28, 2010 Share Posted September 28, 2010 I think you need a space between the minutes and the meridiem. You definitely need to use upper-case "H" for the 24-hour format: $start3='07:30 AM'; $finish3='05:15 PM'; $tstart1 = date( 'H:i', strtotime($start3) ); $tfinish1 = date( 'H:i', strtotime($finish3) ); Quote Link to comment https://forums.phpfreaks.com/topic/214650-strotime-question/#findComment-1116862 Share on other sites More sharing options...
flemingmike Posted September 28, 2010 Author Share Posted September 28, 2010 it was the upper case H. been many hours at this. thanks. Quote Link to comment https://forums.phpfreaks.com/topic/214650-strotime-question/#findComment-1116866 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.