You have to convert your start datetime and endtime through strtotime.
after that substract the starttime from the end time.
after that pass that difference to date or time format that you needed...
so you will get the exact difference between two date.