Php Diff Datetime Minutes. Today new datetime. Time1 new datetime 2017 01 23 18 16 25.
You can simply use datetime diff and format for calculating difference. Echo diff format y. Datetime2 new datetime 2009 10 13 10 12 00.
Today new datetime.
Years 0 months 1 days 2 hours 3 minutes 4 seconds 5 return result. Echo diff format y. Today new datetime. To get the difference between 2 times in minutes or any other measure you can create a datetime object for both times and use the diff method.