add 30 mins to this time

by 2 replies
3
I can not figure out how to add 30 mins to this php time code.

date("g:i", strtotime($day." ".$time))

$day and $time is dynamically set in other code.

i just need the $time in this to add 30 mins to what ever is put in it already.
#programming #add #mins #time
  • date( 'g:i', strtotime( $day . ' ' . $time) + 1800 );

    ( 30 min = 60sec * 30 = 1800 )
    • [ 1 ] Thanks
    • [1] reply
    • thank you very much. that was perfect.

Next Topics on Trending Feed