<?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: Finding difference of days between two dates in PHP</title>
	<atom:link href="http://roshanbh.com.np/2008/03/finding-days-difference-php.html/feed" rel="self" type="application/rss+xml" />
	<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html</link>
	<description>Useful Tutorials, Scripts , Tips, and Resources for all PHP and Ajax beginners and experts .</description>
	<lastBuildDate>Tue, 07 Feb 2012 08:10:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: dillip</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-5576</link>
		<dc:creator>dillip</dc:creator>
		<pubDate>Sat, 07 Aug 2010 08:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-5576</guid>
		<description>thanks for your script</description>
		<content:encoded><![CDATA[<p>thanks for your script</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eren</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-5527</link>
		<dc:creator>Eren</dc:creator>
		<pubDate>Wed, 30 Jun 2010 06:21:55 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-5527</guid>
		<description>Ya this is good solution... But i can&#039;t get the result.</description>
		<content:encoded><![CDATA[<p>Ya this is good solution&#8230; But i can&#8217;t get the result.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erwin</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-5523</link>
		<dc:creator>Erwin</dc:creator>
		<pubDate>Fri, 25 Jun 2010 16:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-5523</guid>
		<description>Nice code, great job
ty</description>
		<content:encoded><![CDATA[<p>Nice code, great job<br />
ty</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhurv Singh</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-5477</link>
		<dc:creator>Dhurv Singh</dc:creator>
		<pubDate>Wed, 02 Jun 2010 13:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-5477</guid>
		<description>Not working dude</description>
		<content:encoded><![CDATA[<p>Not working dude</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johnte</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-5444</link>
		<dc:creator>Johnte</dc:creator>
		<pubDate>Sun, 16 May 2010 12:15:24 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-5444</guid>
		<description>Calculating the date difference based on time stamp is most robust way since it takes care off the difference in date and time formats. example

function GetDateDifference ($Date1,$Date2)
{
      $ConvertToTimeStamp _Date1 = strtotime($Date1);
      $ConvertToTimeStamp_Date2  = strtotime($Date2);
      $DateDifference =  (int)$ConvertToTimeStamp _Date1 - (int)$ConvertToTimeStamp_Date2;
      return round($DateDifference/86400);
}</description>
		<content:encoded><![CDATA[<p>Calculating the date difference based on time stamp is most robust way since it takes care off the difference in date and time formats. example</p>
<p>function GetDateDifference ($Date1,$Date2)<br />
{<br />
      $ConvertToTimeStamp _Date1 = strtotime($Date1);<br />
      $ConvertToTimeStamp_Date2  = strtotime($Date2);<br />
      $DateDifference =  (int)$ConvertToTimeStamp _Date1 &#8211; (int)$ConvertToTimeStamp_Date2;<br />
      return round($DateDifference/86400);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pravin</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-5295</link>
		<dc:creator>Pravin</dc:creator>
		<pubDate>Tue, 23 Mar 2010 10:25:17 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-5295</guid>
		<description>Nice Code Roshan !!
Thanks.</description>
		<content:encoded><![CDATA[<p>Nice Code Roshan !!<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gogrumogru</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-5264</link>
		<dc:creator>gogrumogru</dc:creator>
		<pubDate>Thu, 18 Mar 2010 05:59:18 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-5264</guid>
		<description>Thanks for the scrpt!</description>
		<content:encoded><![CDATA[<p>Thanks for the scrpt!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott - Php</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-5016</link>
		<dc:creator>Scott - Php</dc:creator>
		<pubDate>Wed, 06 Jan 2010 06:46:38 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-5016</guid>
		<description>Hi Roshan,  the following page contains a reference to this article.  Great information.

Calculate the difference between two Dates (and time) using Php.  The following page provides a range of different methods (7 in total) for performing date / time calculations using Php, to determine the difference in time (hours, munites), days, months or years between two dates.

See &lt;a href=&quot;http://forums.webmasterhub.net/viewtopic.php?f=23&amp;t=1831&quot; rel=&quot;nofollow&quot;&gt;Php Date Time - 7 Methods to Calculate the Difference between 2 dates&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Hi Roshan,  the following page contains a reference to this article.  Great information.</p>
<p>Calculate the difference between two Dates (and time) using Php.  The following page provides a range of different methods (7 in total) for performing date / time calculations using Php, to determine the difference in time (hours, munites), days, months or years between two dates.</p>
<p>See <a href="http://forums.webmasterhub.net/viewtopic.php?f=23&amp;t=1831" rel="nofollow">Php Date Time &#8211; 7 Methods to Calculate the Difference between 2 dates</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: XianD6</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-4865</link>
		<dc:creator>XianD6</dc:creator>
		<pubDate>Wed, 02 Dec 2009 07:46:41 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-4865</guid>
		<description>i find your codes very useful,
thanks in advance...</description>
		<content:encoded><![CDATA[<p>i find your codes very useful,<br />
thanks in advance&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: XianD6</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-4864</link>
		<dc:creator>XianD6</dc:creator>
		<pubDate>Wed, 02 Dec 2009 07:44:54 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-4864</guid>
		<description>Hi Roshan,

Calculate How Many Days User Has Stayed With The Book Once She Return It).
I am learning PHP/MySQL, and I am also writting the Library Management
System to make sure that I practice what I am learning.

My Problem is:

I want to capture the date when the library user borrow the book and then
check that date to see if the book have exceeded the number of days (to
calculate how many days user has stayed with the book once she return it).
Please help me how I can do that. I am using mysql as my database.</description>
		<content:encoded><![CDATA[<p>Hi Roshan,</p>
<p>Calculate How Many Days User Has Stayed With The Book Once She Return It).<br />
I am learning PHP/MySQL, and I am also writting the Library Management<br />
System to make sure that I practice what I am learning.</p>
<p>My Problem is:</p>
<p>I want to capture the date when the library user borrow the book and then<br />
check that date to see if the book have exceeded the number of days (to<br />
calculate how many days user has stayed with the book once she return it).<br />
Please help me how I can do that. I am using mysql as my database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patel Dharmendra M</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-4629</link>
		<dc:creator>Patel Dharmendra M</dc:creator>
		<pubDate>Sat, 26 Sep 2009 08:19:48 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-4629</guid>
		<description>Thanks dear all my friends this example very good for my website</description>
		<content:encoded><![CDATA[<p>Thanks dear all my friends this example very good for my website</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: search</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-4614</link>
		<dc:creator>search</dc:creator>
		<pubDate>Thu, 24 Sep 2009 00:34:20 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-4614</guid>
		<description>Thank you. I have been looking around for this function.</description>
		<content:encoded><![CDATA[<p>Thank you. I have been looking around for this function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nirmal</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-4495</link>
		<dc:creator>Nirmal</dc:creator>
		<pubDate>Tue, 25 Aug 2009 17:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-4495</guid>
		<description>I think this is better than aboe proposed solution
function daysDifference($endDate, $beginDate)
{
   	$beginDate = strtotime($beginDate);
	$endDate = strtotime($endDate);
	$diff = $endDate - $beginDate;
	$diff = ceil($diff / (60*60*24)) ; 
	return $diff;
}</description>
		<content:encoded><![CDATA[<p>I think this is better than aboe proposed solution<br />
function daysDifference($endDate, $beginDate)<br />
{<br />
   	$beginDate = strtotime($beginDate);<br />
	$endDate = strtotime($endDate);<br />
	$diff = $endDate &#8211; $beginDate;<br />
	$diff = ceil($diff / (60*60*24)) ;<br />
	return $diff;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vaskar</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-4266</link>
		<dc:creator>vaskar</dc:creator>
		<pubDate>Mon, 27 Jul 2009 05:00:16 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-4266</guid>
		<description>Thank you excellent function too much helpful</description>
		<content:encoded><![CDATA[<p>Thank you excellent function too much helpful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max</title>
		<link>http://roshanbh.com.np/2008/03/finding-days-difference-php.html/comment-page-1#comment-4231</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Tue, 21 Jul 2009 08:29:03 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/2008/03/finding-days-difference-php.html#comment-4231</guid>
		<description>Thanks for the code, it works great! :)</description>
		<content:encoded><![CDATA[<p>Thanks for the code, it works great! <img src='http://roshanbh.com.np/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/23 queries in 0.036 seconds using disk: basic
Object Caching 398/413 objects using disk: basic

Served from: roshanbh.com.np @ 2012-02-09 05:44:43 -->
