php add minutes to datetime – PHP Add Minutes to Time Example

0
()

php add minutes to datetime and display it. The PHP date function is used to format a date. here we can learn to main 2 Examples.

php add minutes to datetime

Adding Minutes to $current_time can be done in many ways. The following source code will php added minutes to datetime.

Example 1: PHP Add Minutes to Time

php_add_minutes_to_time.php

<?php
  
    $myJoinDt = "10:10:05";
    $latestDt = date('H:i:s', strtotime($myJoinDt. ' +10 minutes'));
  
    echo $latestDt;
  
?>

Result

10:20:05

Free Live Chat for Any Issue

don’t miss : Subtract Month

Read Also:  PHP Redirect To Another page Example

Example 2: PHP Add Minutes to Current DateTime

php_add_minutes_to_current_datetime.php

<?php
  
    $latestDt = date('H:i:s', strtotime('+10 minutes'));
  
    echo $latestDt;
  
?>

Result

04:05:51

Download

I hope you get an idea about php add minutes to datetime.
I would like to have feedback on my infinityknow.com.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Read Also:  PHP Google reCAPTCHA Validation Before Submit

How useful was this post?

Click on a star to rate it!