 




<?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: Embedded SQL number of days between dates</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/embedded-sql-number-of-days-between-dates/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sql-number-of-days-between-dates/</link>
	<description></description>
	<lastBuildDate>Sun, 19 May 2013 03:14:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: graybeard52</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sql-number-of-days-between-dates/#comment-83752</link>
		<dc:creator>graybeard52</dc:creator>
		<pubDate>Sat, 13 Nov 2010 03:45:04 +0000</pubDate>
		<guid isPermaLink="false">#comment-83752</guid>
		<description><![CDATA[DAYS( )  should work.  I use it frequently in SQL.  The trick is to make sure the variable supplied is recognized as a date by SQL.  When embedded in RPG, using the RPG date functions are much more powerful.]]></description>
		<content:encoded><![CDATA[<p>DAYS( )  should work.  I use it frequently in SQL.  The trick is to make sure the variable supplied is recognized as a date by SQL.  When embedded in RPG, using the RPG date functions are much more powerful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sql-number-of-days-between-dates/#comment-83660</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Thu, 11 Nov 2010 17:46:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-83660</guid>
		<description><![CDATA[It seems that substracting two dates will produce a result in the format of YYMMDD, son in this case 530 would mean 5 months, 30 days.

I just googled it, and maybe the DAYS function is what you are looking for.

&lt;pre&gt;DAYS(:CURDATE) - DAYS(HTADAT)&lt;/pre&gt;

But I don&#039;t really know if this function is available on the AS400.  Let&#039;s wait for someone to confirm, or correct my suggestion.]]></description>
		<content:encoded><![CDATA[<p>It seems that substracting two dates will produce a result in the format of YYMMDD, son in this case 530 would mean 5 months, 30 days.</p>
<p>I just googled it, and maybe the DAYS function is what you are looking for.</p>
<pre>DAYS(:CURDATE) - DAYS(HTADAT)</pre>
<p>But I don&#8217;t really know if this function is available on the AS400.  Let&#8217;s wait for someone to confirm, or correct my suggestion.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/8 queries in 0.012 seconds using memcached
Object Caching 283/284 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-19 03:59:02 -->