Jump to content

Adding time to string time

- - - - -

  • Please log in to reply
1 reply to this topic

#1
lol33d

lol33d

    Programmer

  • Members
  • PipPipPipPip
  • 149 posts
Hi, i want this time: 21:25

How to Adding time using php?

Thank you:w00t:

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
You may get an unreliable result, but the gist of it would be:
echo date("H:m", strtotime("21:25 + 1 hour"));
//or
echo date("H:m", strtotime("21:25") + 3600);

Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users