add 30 mins to this time

2 replies
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.
#add #mins #time
  • Profile picture of the author SteveJohnson
    Originally Posted by layouts4you View Post

    I can not figure out how to add 30 mins to this php time code.

    date("g:i", strtotime(." ".))

    and is dynamically set in other code.

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

    ( 30 min = 60sec * 30 = 1800 )
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[7531451].message }}
    • Profile picture of the author layouts4you
      thank you very much. that was perfect.
      {{ DiscussionBoard.errors[7532160].message }}

Trending Topics