php datetime минус datetime

Discussion in 'PHP' started by people2people, 11 Apr 2020.

  1. people2people

    people2people Banned

    Joined:
    1 Dec 2019
    Messages:
    167
    Likes Received:
    64
    Reputations:
    0
    php datetime минус datetime
    Code:
    $user_for_referall_datetime = "2020-04-11 14:28:11";
    почему данный код не работает?
    Code:
    $diff_time = date("Y-m-d H:i:s")->diff($user_for_referall_datetime);
    Выдает ошибку
    нужно настоящее время отнять от того, которое есть в базе данных.
     
    #1 people2people, 11 Apr 2020
    Last edited: 11 Apr 2020
Loading...
Similar Threads - datetime минус datetime
  1. strecher
    Replies:
    5
    Views:
    1,610