<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Edwin M SarmientoISDATE() function returns 0 for valid DATETIMEOFFSET values? &#8211; Edwin M Sarmiento</title>
	<atom:link href="https://www.edwinmsarmiento.com/isdate-function-returns-0-for-valid-datetimeoffset-values/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.edwinmsarmiento.com</link>
	<description>Intentional Excellence</description>
	<lastBuildDate>Mon, 13 Apr 2026 21:00:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">84283043</site>		<item>
		<title>ISDATE() function returns 0 for valid DATETIMEOFFSET values?</title>
		<link>https://www.edwinmsarmiento.com/isdate-function-returns-0-for-valid-datetimeoffset-values/</link>
		<comments>https://www.edwinmsarmiento.com/isdate-function-returns-0-for-valid-datetimeoffset-values/#respond</comments>
		<pubDate>Tue, 08 Sep 2009 22:02:00 +0000</pubDate>
		<dc:creator>Edwin M Sarmiento</dc:creator>
				<category><![CDATA[DATETIMEOFFSET]]></category>
		<category><![CDATA[ISDATE()]]></category>
		<guid isPermaLink="false">http://bassplayerdoc.wordpress.com/2009/09/08/isdate-function-returns-0-for-valid-datetimeoffset-values</guid>

				<description><![CDATA[Quite confusing but true. I was working on trying to validate a specific value if it is indeed a valid DATETIMEOFFSET data type using the ISDATE() function until I saw this forum post &#8220;Adam, The problem is that ISDATE returns 0 for valid DATETIMEOFFSET values.&#8221; I couldn&#8217;t believe it since Books Online until I tested [&#8230;]]]></description>
					<content:encoded><![CDATA[<p><span style="font-family:arial;">Quite confusing but true. I was working on trying to validate a specific value if it is indeed a valid DATETIMEOFFSET data type using the <a href="http://msdn.microsoft.com/en-us/library/ms187347.aspx">ISDATE()</a> function until I saw this <a href="http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/77a57397-7b70-4ee7-a5bf-b6d26a3c9610">forum post </a></span></p>
<p>&#8220;<span style="font-size:85%;"><span style="font-style:italic;">Adam,</span></span></p>
<p><span style="font-style:italic;">The problem is that ISDATE returns 0 for valid DATETIMEOFFSET values.</span>&#8221;</p>
<p><span style="font-family:arial;">I couldn&#8217;t believe it since Books Online until I tested it out myself</span></p>
<p><code style="font-size:12px;"><span style="color:blue;">IF </span><span style="color:magenta;">ISDATE</span><span style="color:gray;">(</span><span style="color:red;">'2009-09-08 10:19:41.177 -05:00'</span><span style="color:gray;">) </span><span style="color:blue;">= </span><span style="color:black;">1<br />
</span><span style="color:blue;">PRINT </span><span style="color:red;">'VALID'<br />
</span><span style="color:blue;">ELSE<br />
PRINT </span><span style="color:red;">'INVALID'</span></code></p>
<p><span style="font-family:arial;">This returns INVALID when, in fact, it is a valid datetime value with time zone awareness. I even tried the values provided by <a href="http://msdn.microsoft.com/en-us/library/bb630289.aspx">Books Online</a> and still gives me invalid results. I have yet to wait for a response from the SQL Server product group regarding this but at least it gives us an opportunity to dig deper </span></p>
<div class="blogger-post-footer"><img decoding="async" src="https://blogger.googleusercontent.com/tracker/92377218009570869-2535868116495513790?l=bassplayerdoc.blogspot.com" alt="" width="1" height="1" /></div>
]]></content:encoded>
			

		<wfw:commentRss>https://www.edwinmsarmiento.com/isdate-function-returns-0-for-valid-datetimeoffset-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
				<post-id xmlns="com-wordpress:feed-additions:1">199</post-id>	</item>
	</channel>
</rss>