<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How do I show the difference between two dates and times in php?</title>
	<atom:link href="http://www.codebrothers.org/how-do-i-show-the-difference-between-two-dates-and-times-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codebrothers.org/how-do-i-show-the-difference-between-two-dates-and-times-in-php/</link>
	<description></description>
	<lastBuildDate>Mon, 02 Jan 2012 00:02:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: my_screen_name</title>
		<link>http://www.codebrothers.org/how-do-i-show-the-difference-between-two-dates-and-times-in-php/comment-page-1/#comment-2137</link>
		<dc:creator>my_screen_name</dc:creator>
		<pubDate>Fri, 12 Mar 2010 22:33:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.codebrothers.org/how-do-i-show-the-difference-between-two-dates-and-times-in-php/#comment-2137</guid>
		<description>there is no out of the box solution as your question is very specific, here is an idea.

use strtotime or mktime to convert your date time to a unix timestamp. once you have two unix time stamps you can get the difference in seconds.

so

$diff &lt; 60 // difference is less than a minute

$diff &lt; (60 * 60) // diff less than one hour

$diff &lt; (60 * 60 * 24) // diff less than a day

after that you need mathematics to convert your seconds of difference in to readable hour minute format.</description>
		<content:encoded><![CDATA[<p>there is no out of the box solution as your question is very specific, here is an idea.</p>
<p>use strtotime or mktime to convert your date time to a unix timestamp. once you have two unix time stamps you can get the difference in seconds.</p>
<p>so</p>
<p>$diff &lt; 60 // difference is less than a minute</p>
<p>$diff &lt; (60 * 60) // diff less than one hour</p>
<p>$diff &lt; (60 * 60 * 24) // diff less than a day</p>
<p>after that you need mathematics to convert your seconds of difference in to readable hour minute format.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roland J</title>
		<link>http://www.codebrothers.org/how-do-i-show-the-difference-between-two-dates-and-times-in-php/comment-page-1/#comment-2138</link>
		<dc:creator>Roland J</dc:creator>
		<pubDate>Fri, 12 Mar 2010 22:33:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.codebrothers.org/how-do-i-show-the-difference-between-two-dates-and-times-in-php/#comment-2138</guid>
		<description>Look up date functions on http://www.php.net

RJ</description>
		<content:encoded><![CDATA[<p>Look up date functions on http://www.php.net</p>
<p>RJ</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
