1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to calculate the time difference between two timestamps in php?

Discussion in 'General Programming Chat' started by qptopm, Mar 24, 2016.

Tags:
  1. qptopm

    qptopm Newbie

    Joined:
    Jul 31, 2014
    Messages:
    38
    Likes Received:
    5
    Home Page:
    How to calculate the time difference between two timestamps in php?
     
  2. nigglesmelb

    nigglesmelb Registered Member

    Joined:
    Nov 27, 2015
    Messages:
    61
    Likes Received:
    16
    From Stack Overflow, the "go to" site for programming questions ->
     
    • Thanks Thanks x 2
  3. jamie3000

    jamie3000 Supreme Member

    Joined:
    Jun 30, 2014
    Messages:
    1,311
    Likes Received:
    586
    Occupation:
    Finance coder looking for semi-retirement
    Location:
    uk
    I'd always post this sort of thing in stack over flow mate, you'll get a response super quick. Its by far the best site for coding problems.
     
    • Thanks Thanks x 1
  4. towelfox

    towelfox Junior Member

    Joined:
    Jan 11, 2012
    Messages:
    173
    Likes Received:
    55
    Have a look into Carbon if you do a lot with datetime it's really quite useful.https://github.com/briannesbitt/Carbon

    Jamie3000 is right, coding questions are best asked on stack overflow. You can usually Google search the question like 'php calculate timestamp difference' or similar and get an instant answer from there or some other helpful tech blogger