what i can understand from your problem is that you want the difference between the two datetime variables.
is it ok? if yes read on...
check out date and time functions in php manual, there you will find mktime()
this is the function you will need. Basically just convert both variables to UNIX type timestamp and then get the difference. After you are done convert them back to date !!
simple isn't it?
i am not giving any sample as the manual is easy enough to understand...
cheers!