<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Function to Round Up Time to Nearest Minutes Interval</title>
	<atom:link href="http://blog.sqlauthority.com/2012/11/02/sql-server-function-to-round-up-time-to-nearest-minutes-interval/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2012/11/02/sql-server-function-to-round-up-time-to-nearest-minutes-interval/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Wed, 19 Jun 2013 08:01:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Dave</title>
		<link>http://blog.sqlauthority.com/2012/11/02/sql-server-function-to-round-up-time-to-nearest-minutes-interval/#comment-409359</link>
		<dc:creator><![CDATA[Dave]]></dc:creator>
		<pubDate>Fri, 18 Jan 2013 12:30:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21367#comment-409359</guid>
		<description><![CDATA[Hi, 
I cannot get this to work.  If I enter a time of 13:34 with an interval of 15 I thout it would go to 13:45, 

DECLARE @Dt DATETIME; 
SET @Dt = CAST(&#039;2013-01-18 13:34.123&#039; AS DATETIME);
SELECT dbo.RoundTime(@dt,15)]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
I cannot get this to work.  If I enter a time of 13:34 with an interval of 15 I thout it would go to 13:45, </p>
<p>DECLARE @Dt DATETIME;<br />
SET @Dt = CAST(&#8217;2013-01-18 13:34.123&#8242; AS DATETIME);<br />
SELECT dbo.RoundTime(@dt,15)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Display Datetime in Specific Format &#8211; SQL in Sixty Seconds #033 &#8211; Video &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2012/11/02/sql-server-function-to-round-up-time-to-nearest-minutes-interval/#comment-377768</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Display Datetime in Specific Format &#8211; SQL in Sixty Seconds #033 &#8211; Video &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Wed, 21 Nov 2012 01:30:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21367#comment-377768</guid>
		<description><![CDATA[[...] Function to Round Up Time to Nearest Minutes Interval [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Function to Round Up Time to Nearest Minutes Interval [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2012/11/02/sql-server-function-to-round-up-time-to-nearest-minutes-interval/#comment-377187</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Tue, 20 Nov 2012 06:33:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21367#comment-377187</guid>
		<description><![CDATA[select getdate(),dateadd(minute,datediff(minute,0,getdate()),0)]]></description>
		<content:encoded><![CDATA[<p>select getdate(),dateadd(minute,datediff(minute,0,getdate()),0)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumar Harsh</title>
		<link>http://blog.sqlauthority.com/2012/11/02/sql-server-function-to-round-up-time-to-nearest-minutes-interval/#comment-375039</link>
		<dc:creator><![CDATA[Kumar Harsh]]></dc:creator>
		<pubDate>Fri, 16 Nov 2012 16:42:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21367#comment-375039</guid>
		<description><![CDATA[Cathy,can you give two example and expected answer you are looking for ?]]></description>
		<content:encoded><![CDATA[<p>Cathy,can you give two example and expected answer you are looking for ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cathy</title>
		<link>http://blog.sqlauthority.com/2012/11/02/sql-server-function-to-round-up-time-to-nearest-minutes-interval/#comment-374203</link>
		<dc:creator><![CDATA[Cathy]]></dc:creator>
		<pubDate>Wed, 14 Nov 2012 21:20:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21367#comment-374203</guid>
		<description><![CDATA[How would you modify this function to always round up, and not up or down to the closest x mins?]]></description>
		<content:encoded><![CDATA[<p>How would you modify this function to always round up, and not up or down to the closest x mins?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumar Harsh</title>
		<link>http://blog.sqlauthority.com/2012/11/02/sql-server-function-to-round-up-time-to-nearest-minutes-interval/#comment-368056</link>
		<dc:creator><![CDATA[Kumar Harsh]]></dc:creator>
		<pubDate>Fri, 02 Nov 2012 17:38:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21367#comment-368056</guid>
		<description><![CDATA[Excellent,Harsh.]]></description>
		<content:encoded><![CDATA[<p>Excellent,Harsh.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justine</title>
		<link>http://blog.sqlauthority.com/2012/11/02/sql-server-function-to-round-up-time-to-nearest-minutes-interval/#comment-367837</link>
		<dc:creator><![CDATA[Justine]]></dc:creator>
		<pubDate>Fri, 02 Nov 2012 08:43:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21367#comment-367837</guid>
		<description><![CDATA[thanks for sharing this to me]]></description>
		<content:encoded><![CDATA[<p>thanks for sharing this to me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harsh</title>
		<link>http://blog.sqlauthority.com/2012/11/02/sql-server-function-to-round-up-time-to-nearest-minutes-interval/#comment-367808</link>
		<dc:creator><![CDATA[Harsh]]></dc:creator>
		<pubDate>Fri, 02 Nov 2012 07:03:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21367#comment-367808</guid>
		<description><![CDATA[for ,
SELECT dbo.roundtime(GETDATE(),5)
result should come &#039;2012-11-02 12:35:00.000&#039;, but it came &#039;2012-11-02 12:34:59.997&#039;

My suggested solution is :
SELECT DATEADD(mi,ROUND(DATEDIFF(mi,0,@Time)*1.0/@RoundToMin,0)*@RoundToMin,0)]]></description>
		<content:encoded><![CDATA[<p>for ,<br />
SELECT dbo.roundtime(GETDATE(),5)<br />
result should come &#8217;2012-11-02 12:35:00.000&#8242;, but it came &#8217;2012-11-02 12:34:59.997&#8242;</p>
<p>My suggested solution is :<br />
SELECT DATEADD(mi,ROUND(DATEDIFF(mi,0,@Time)*1.0/@RoundToMin,0)*@RoundToMin,0)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sanjay Monpara</title>
		<link>http://blog.sqlauthority.com/2012/11/02/sql-server-function-to-round-up-time-to-nearest-minutes-interval/#comment-367785</link>
		<dc:creator><![CDATA[Sanjay Monpara]]></dc:creator>
		<pubDate>Fri, 02 Nov 2012 05:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21367#comment-367785</guid>
		<description><![CDATA[Its very helpfull function!
Thanks]]></description>
		<content:encoded><![CDATA[<p>Its very helpfull function!<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kwok</title>
		<link>http://blog.sqlauthority.com/2012/11/02/sql-server-function-to-round-up-time-to-nearest-minutes-interval/#comment-367775</link>
		<dc:creator><![CDATA[Kwok]]></dc:creator>
		<pubDate>Fri, 02 Nov 2012 05:31:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21367#comment-367775</guid>
		<description><![CDATA[It is a very useful function. Refer to the script, may I know what is the purpose of converting datetime to varchar and back to dateime ? i.e. CONVERT(VARCHAR,@Time,121) AS DATETIME]]></description>
		<content:encoded><![CDATA[<p>It is a very useful function. Refer to the script, may I know what is the purpose of converting datetime to varchar and back to dateime ? i.e. CONVERT(VARCHAR,@Time,121) AS DATETIME</p>
]]></content:encoded>
	</item>
</channel>
</rss>
