<?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; Retrieve &#8211; Select Only Date Part From DateTime &#8211; Best Practice &#8211; Part 2</title>
	<atom:link href="http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Mon, 13 Feb 2012 15:11:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-82667</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Mon, 02 Aug 2010 10:53:40 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-82667</guid>
		<description><![CDATA[You should always use unambiguous formats like YYYYMMDD format. The code you posted depends on the server&#039;s date settings
http://beyondrelational.com/blogs/madhivanan/archive/2010/06/21/understanding-datetime-column-part-ii.aspx]]></description>
		<content:encoded><![CDATA[<p>You should always use unambiguous formats like YYYYMMDD format. The code you posted depends on the server&#8217;s date settings<br />
<a href="http://beyondrelational.com/blogs/madhivanan/archive/2010/06/21/understanding-datetime-column-part-ii.aspx" rel="nofollow">http://beyondrelational.com/blogs/madhivanan/archive/2010/06/21/understanding-datetime-column-part-ii.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-82663</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Mon, 02 Aug 2010 10:47:23 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-82663</guid>
		<description><![CDATA[It should be in unambiguous format like YYYYMMDD. Refer this post for more informations
http://beyondrelational.com/blogs/madhivanan/archive/2010/06/21/understanding-datetime-column-part-ii.aspx]]></description>
		<content:encoded><![CDATA[<p>It should be in unambiguous format like YYYYMMDD. Refer this post for more informations<br />
<a href="http://beyondrelational.com/blogs/madhivanan/archive/2010/06/21/understanding-datetime-column-part-ii.aspx" rel="nofollow">http://beyondrelational.com/blogs/madhivanan/archive/2010/06/21/understanding-datetime-column-part-ii.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-82658</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Mon, 02 Aug 2010 10:24:39 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-82658</guid>
		<description><![CDATA[Make sure to read this post to know how to use date values effectively in the where clause
http://beyondrelational.com/blogs/madhivanan/archive/2010/06/21/understanding-datetime-column-part-iii.aspx]]></description>
		<content:encoded><![CDATA[<p>Make sure to read this post to know how to use date values effectively in the where clause<br />
<a href="http://beyondrelational.com/blogs/madhivanan/archive/2010/06/21/understanding-datetime-column-part-iii.aspx" rel="nofollow">http://beyondrelational.com/blogs/madhivanan/archive/2010/06/21/understanding-datetime-column-part-iii.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-82656</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Mon, 02 Aug 2010 10:22:16 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-82656</guid>
		<description><![CDATA[I think that floor method would take more time becuase of two functions floor and float]]></description>
		<content:encoded><![CDATA[<p>I think that floor method would take more time becuase of two functions floor and float</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-82655</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Mon, 02 Aug 2010 10:21:12 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-82655</guid>
		<description><![CDATA[SELECT case when 1=1 then &#039;yes&#039; else &#039;No&#039; end]]></description>
		<content:encoded><![CDATA[<p>SELECT case when 1=1 then &#8216;yes&#8217; else &#8216;No&#8217; end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashish</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-82649</link>
		<dc:creator><![CDATA[Ashish]]></dc:creator>
		<pubDate>Mon, 02 Aug 2010 09:24:57 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-82649</guid>
		<description><![CDATA[or you can use between operator as well:-

like

where date between ’29-07-2010 00:00&#039; and &#039;29-07-2010 23:59:59&#039;]]></description>
		<content:encoded><![CDATA[<p>or you can use between operator as well:-</p>
<p>like</p>
<p>where date between ’29-07-2010 00:00&#8242; and &#8217;29-07-2010 23:59:59&#8242;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashish</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-82646</link>
		<dc:creator><![CDATA[Ashish]]></dc:creator>
		<pubDate>Mon, 02 Aug 2010 09:06:45 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-82646</guid>
		<description><![CDATA[thanks for reply.
in that case just use in your where condition as 
where date &gt;= ’29-07-2010′ and date &lt; &#039;30-07-2010&#039;]]></description>
		<content:encoded><![CDATA[<p>thanks for reply.<br />
in that case just use in your where condition as<br />
where date &gt;= ’29-07-2010′ and date &lt; &#039;30-07-2010&#039;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vikram</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-82455</link>
		<dc:creator><![CDATA[vikram]]></dc:creator>
		<pubDate>Sat, 31 Jul 2010 10:46:16 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-82455</guid>
		<description><![CDATA[thanks for reply Ashish...

your suggestion works for me  but the problem is that after using date &gt;= ’29-07-2010′  will also display the data who is greater than ’29-07-2010′ date but i need only which is equals to date=’29-07-2010′. well i am trying to display the daily transaction/history of the report. so i m still trying and hoping for solution. hope u understand my problem. :)

thanks regards
vik]]></description>
		<content:encoded><![CDATA[<p>thanks for reply Ashish&#8230;</p>
<p>your suggestion works for me  but the problem is that after using date &gt;= ’29-07-2010′  will also display the data who is greater than ’29-07-2010′ date but i need only which is equals to date=’29-07-2010′. well i am trying to display the daily transaction/history of the report. so i m still trying and hoping for solution. hope u understand my problem. :)</p>
<p>thanks regards<br />
vik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashish</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-82204</link>
		<dc:creator><![CDATA[Ashish]]></dc:creator>
		<pubDate>Thu, 29 Jul 2010 11:52:06 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-82204</guid>
		<description><![CDATA[are you sure you using the correct date format in where condition.
First run the select and see the format of date and then you can use date &gt;= &#039;29-07-2010&#039;.

I am sure its the date format and your date should be in the format of dd-mm-yyyy instead of dd/mm/yyyy]]></description>
		<content:encoded><![CDATA[<p>are you sure you using the correct date format in where condition.<br />
First run the select and see the format of date and then you can use date &gt;= &#8217;29-07-2010&#8242;.</p>
<p>I am sure its the date format and your date should be in the format of dd-mm-yyyy instead of dd/mm/yyyy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vikram</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-82189</link>
		<dc:creator><![CDATA[vikram]]></dc:creator>
		<pubDate>Thu, 29 Jul 2010 09:08:37 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-82189</guid>
		<description><![CDATA[i m storing the date and time in date_time field with same id like..

1. aman        7/29/2010 12:59:02 PM
1. aman        7/29/2010 1:05:31 PM
1. aman        7/29/2010 1:07:43 PM

how can i count the records using where condition 
i m trying the following query but no any result:-

select Count(*)  from tbname where date_time=&#039;7/29/2010&#039;

ouput is 
0

where  m doing mistake. please assist me.
thanks
vik]]></description>
		<content:encoded><![CDATA[<p>i m storing the date and time in date_time field with same id like..</p>
<p>1. aman        7/29/2010 12:59:02 PM<br />
1. aman        7/29/2010 1:05:31 PM<br />
1. aman        7/29/2010 1:07:43 PM</p>
<p>how can i count the records using where condition<br />
i m trying the following query but no any result:-</p>
<p>select Count(*)  from tbname where date_time=&#8217;7/29/2010&#8242;</p>
<p>ouput is<br />
0</p>
<p>where  m doing mistake. please assist me.<br />
thanks<br />
vik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – DATE and TIME in SQL Server 2008 Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-73328</link>
		<dc:creator><![CDATA[SQL SERVER – DATE and TIME in SQL Server 2008 Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Thu, 27 May 2010 01:31:42 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-73328</guid>
		<description><![CDATA[[...]    I was thinking about DATE and TIME datatypes in SQL Server 2008. I earlier wrote about the about best practices of the same. Recently I had written one of the script written for SQL Server 2008 had to run on SQL [...]]]></description>
		<content:encoded><![CDATA[<p>[...]    I was thinking about DATE and TIME datatypes in SQL Server 2008. I earlier wrote about the about best practices of the same. Recently I had written one of the script written for SQL Server 2008 had to run on SQL [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chandrakant Singh</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-62457</link>
		<dc:creator><![CDATA[chandrakant Singh]]></dc:creator>
		<pubDate>Tue, 09 Mar 2010 06:10:45 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-62457</guid>
		<description><![CDATA[I Want to Become a good sql developer can you suggest me how to start  Or what are the steps]]></description>
		<content:encoded><![CDATA[<p>I Want to Become a good sql developer can you suggest me how to start  Or what are the steps</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: R A Valencourt</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-52888</link>
		<dc:creator><![CDATA[R A Valencourt]]></dc:creator>
		<pubDate>Tue, 09 Jun 2009 19:35:41 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-52888</guid>
		<description><![CDATA[Hello,

I&#039;m wondering whether use of FLOOR would be equivalent to your Method 1, both in how it&#039;s executed by SQL Server, and thus in performance?

Method 1:
SELECT DATEADD(D, 0, DATEDIFF(D, 0, GETDATE()))

FLOOR Method:
CAST( FLOOR( CAST( GETDATE() AS FLOAT ) ) AS DATETIME )

René]]></description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I&#8217;m wondering whether use of FLOOR would be equivalent to your Method 1, both in how it&#8217;s executed by SQL Server, and thus in performance?</p>
<p>Method 1:<br />
SELECT DATEADD(D, 0, DATEDIFF(D, 0, GETDATE()))</p>
<p>FLOOR Method:<br />
CAST( FLOOR( CAST( GETDATE() AS FLOAT ) ) AS DATETIME )</p>
<p>René</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satya</title>
		<link>http://blog.sqlauthority.com/2008/10/18/sql-server-retrieve-select-only-date-part-from-datetime-best-practice-part-2/#comment-43880</link>
		<dc:creator><![CDATA[Satya]]></dc:creator>
		<pubDate>Thu, 23 Oct 2008 15:48:59 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1383#comment-43880</guid>
		<description><![CDATA[Can you explain about switch and case statements 
i need help on them]]></description>
		<content:encoded><![CDATA[<p>Can you explain about switch and case statements<br />
i need help on them</p>
]]></content:encoded>
	</item>
</channel>
</rss>

