<?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: A &#8216;MakeDate&#8217; function for MS SQL Server</title>
	<atom:link href="http://www.stillnetstudios.com/makedate-function-ms-sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stillnetstudios.com/makedate-function-ms-sql-server/</link>
	<description>Web development notes and commentary from Ryan Stille</description>
	<lastBuildDate>Fri, 30 Jul 2010 20:41:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ryan Stille</title>
		<link>http://www.stillnetstudios.com/makedate-function-ms-sql-server/comment-page-1/#comment-515</link>
		<dc:creator>Ryan Stille</dc:creator>
		<pubDate>Fri, 03 Apr 2009 20:28:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.stillnetstudios.com/?p=361#comment-515</guid>
		<description>Nice, thanks.</description>
		<content:encoded><![CDATA[<p>Nice, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roland Collins</title>
		<link>http://www.stillnetstudios.com/makedate-function-ms-sql-server/comment-page-1/#comment-514</link>
		<dc:creator>Roland Collins</dc:creator>
		<pubDate>Fri, 03 Apr 2009 20:24:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.stillnetstudios.com/?p=361#comment-514</guid>
		<description>This one will run much faster if you&#039;re using it in a batch statement since it avoids the extra variable declarations and string conversions.

CREATE FUNCTION [dbo].[MakeDate]
(
&#160;&#160;&#160;&#160;-- Add the parameters for the function here
&#160;&#160;&#160;&#160;@year INT, @month INT, @day INT
)
RETURNS smalldatetime
AS
BEGIN

RETURN CONVERT(SMALLDATETIME, CONVERT(VARCHAR, @month) + &#039;/&#039; + CONVERT(VARCHAR, @day) + &#039;/&#039; + CONVERT(VARCHAR, @year))

END</description>
		<content:encoded><![CDATA[<p>This one will run much faster if you&#039;re using it in a batch statement since it avoids the extra variable declarations and string conversions.</p>
<p>CREATE FUNCTION [dbo].[MakeDate]<br />
(<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#8211; Add the parameters for the function here<br />
&nbsp;&nbsp;&nbsp;&nbsp;@year INT, @month INT, @day INT<br />
)<br />
RETURNS smalldatetime<br />
AS<br />
BEGIN</p>
<p>RETURN CONVERT(SMALLDATETIME, CONVERT(VARCHAR, @month) + &#039;/&#039; + CONVERT(VARCHAR, @day) + &#039;/&#039; + CONVERT(VARCHAR, @year))</p>
<p>END</p>
]]></content:encoded>
	</item>
</channel>
</rss>
