<?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; Difference Between DATETIME and DATETIME2</title>
	<atom:link href="http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Wed, 19 Jun 2013 21:45:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #033 &#124; Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-502057</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #033 &#124; Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Sat, 15 Jun 2013 01:31:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-502057</guid>
		<description><![CDATA[[&#8230;] Difference Between DATETIME and DATETIME2 [&#8230;]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] Difference Between DATETIME and DATETIME2 [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shrikant</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-435935</link>
		<dc:creator><![CDATA[Shrikant]]></dc:creator>
		<pubDate>Tue, 12 Mar 2013 08:45:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-435935</guid>
		<description><![CDATA[in condition use -- convert(varchar(10),firstdate,103)=convert(varchar(10),lastdate,103)]]></description>
		<content:encoded><![CDATA[<p>in condition use &#8212; convert(varchar(10),firstdate,103)=convert(varchar(10),lastdate,103)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fentahunt@gmail.com</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-394832</link>
		<dc:creator><![CDATA[fentahunt@gmail.com]]></dc:creator>
		<pubDate>Mon, 17 Dec 2012 10:29:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-394832</guid>
		<description><![CDATA[how can i insert the date difference in to int columns]]></description>
		<content:encoded><![CDATA[<p>how can i insert the date difference in to int columns</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #007 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-393527</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #007 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 15 Dec 2012 01:31:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-393527</guid>
		<description><![CDATA[[...] Difference Between DATETIME and DATETIME2 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Difference Between DATETIME and DATETIME2 [...]</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/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-377771</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:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-377771</guid>
		<description><![CDATA[[...] Difference Between DATETIME and DATETIME2 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Difference Between DATETIME and DATETIME2 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Lots of Date Functions &#8211; Find Right One to Use &#8211; Quiz &#8211; Puzzle &#8211; 27 of 31 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-244735</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Lots of Date Functions &#8211; Find Right One to Use &#8211; Quiz &#8211; Puzzle &#8211; 27 of 31 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 28 Jan 2012 01:32:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-244735</guid>
		<description><![CDATA[[...] Server Interview Questions and Answers ISBN: 1466405643 Page#133 Difference Between DATETIME and DATETIME2 Difference Between GETDATE and SYSDATETIME Get Time in Hour:Minute Format from a Datetime – Get [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Server Interview Questions and Answers ISBN: 1466405643 Page#133 Difference Between DATETIME and DATETIME2 Difference Between GETDATE and SYSDATETIME Get Time in Hour:Minute Format from a Datetime – Get [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Information Related to DATETIME and DATETIME2 Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-99885</link>
		<dc:creator><![CDATA[SQL SERVER – Information Related to DATETIME and DATETIME2 Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Mon, 15 Nov 2010 01:31:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-99885</guid>
		<description><![CDATA[[...] SQL SERVER – Difference Between DATETIME and DATETIME2 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER – Difference Between DATETIME and DATETIME2 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jing Sheng Zhong</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-99367</link>
		<dc:creator><![CDATA[Jing Sheng Zhong]]></dc:creator>
		<pubDate>Fri, 12 Nov 2010 17:26:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-99367</guid>
		<description><![CDATA[Hi Pinal,

It&#039;s so happy to read this your blog. The issue you found in SQL server new datetime type is related time source function precision. Folks have found the root reason of  the problem -----when data time values are converted (implict or explict) between different data type, which would lose some precision, so the result cannot match each other as thought. Here I would like to gave a work around solution to solve the problem which the developers met. I use it in my work. 

Hopes it helps to the developers met same problem.

Jing

---------------------------------------------------------------


DECLARE @Intveral INT, @CurDate DATETIMEOFFSET;
CREATE TABLE #TimeTable (FirstDate DATETIME, LastDate DATETIME2, GlobalDate DATETIMEOFFSET)

SET @Intveral = 10000
WHILE (@Intveral &gt; 0)
BEGIN

	--SET @CurDate = SYSDATETIMEOFFSET();											-- higher precision for future use only
	SET @CurDate = TODATETIMEOFFSET(GETDATE(),DATEDIFF(N,GETUTCDATE(),GETDATE()));	-- lower precision to match exited date process

	INSERT #TimeTable (FirstDate, LastDate, GlobalDate)
	VALUES (@CurDate, @CurDate, @CurDate)
	SET @Intveral = @Intveral - 1
END
GO

SELECT COUNT(DISTINCT FirstDate) D_DATETIME, 
	COUNT(DISTINCT LastDate) D_DATETIME2,
	COUNT(DISTINCT GlobalDate) D_SYSGETDATE
FROM #TimeTable
GO

SELECT DISTINCT a.FirstDate,b.LastDate, b.GlobalDate,CAST(b.GlobalDate AS DATETIME)
FROM #TimeTable a
INNER JOIN #TimeTable b ON a.FirstDate =CAST (b.GlobalDate AS DATETIME)
GO

SELECT *
FROM #TimeTable
GO

DROP TABLE #TimeTable
GO]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>It&#8217;s so happy to read this your blog. The issue you found in SQL server new datetime type is related time source function precision. Folks have found the root reason of  the problem &#8212;&#8211;when data time values are converted (implict or explict) between different data type, which would lose some precision, so the result cannot match each other as thought. Here I would like to gave a work around solution to solve the problem which the developers met. I use it in my work. </p>
<p>Hopes it helps to the developers met same problem.</p>
<p>Jing</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>DECLARE @Intveral INT, @CurDate DATETIMEOFFSET;<br />
CREATE TABLE #TimeTable (FirstDate DATETIME, LastDate DATETIME2, GlobalDate DATETIMEOFFSET)</p>
<p>SET @Intveral = 10000<br />
WHILE (@Intveral &gt; 0)<br />
BEGIN</p>
<p>	&#8211;SET @CurDate = SYSDATETIMEOFFSET();											&#8211; higher precision for future use only<br />
	SET @CurDate = TODATETIMEOFFSET(GETDATE(),DATEDIFF(N,GETUTCDATE(),GETDATE()));	&#8211; lower precision to match exited date process</p>
<p>	INSERT #TimeTable (FirstDate, LastDate, GlobalDate)<br />
	VALUES (@CurDate, @CurDate, @CurDate)<br />
	SET @Intveral = @Intveral &#8211; 1<br />
END<br />
GO</p>
<p>SELECT COUNT(DISTINCT FirstDate) D_DATETIME,<br />
	COUNT(DISTINCT LastDate) D_DATETIME2,<br />
	COUNT(DISTINCT GlobalDate) D_SYSGETDATE<br />
FROM #TimeTable<br />
GO</p>
<p>SELECT DISTINCT a.FirstDate,b.LastDate, b.GlobalDate,CAST(b.GlobalDate AS DATETIME)<br />
FROM #TimeTable a<br />
INNER JOIN #TimeTable b ON a.FirstDate =CAST (b.GlobalDate AS DATETIME)<br />
GO</p>
<p>SELECT *<br />
FROM #TimeTable<br />
GO</p>
<p>DROP TABLE #TimeTable<br />
GO</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashutosh Dixit</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-79079</link>
		<dc:creator><![CDATA[Ashutosh Dixit]]></dc:creator>
		<pubDate>Wed, 07 Jul 2010 11:59:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-79079</guid>
		<description><![CDATA[hi Pinal

I have executed the same on sql server 2008 and found that 

1- First query returned same results for both columns. Results is below:-

D_GETDATE	D_SYSGETDATE
84	                 84

2- Joins are also working fine.
FirstDate	                            LastDate
2010-07-07 06:55:32.527   2010-07-07 06:55:32.5270000
2010-07-07 06:55:34.777   2010-07-07 06:55:34.7770000
2010-07-07 06:55:34.027   2010-07-07 06:55:34.0270000

Thanks.
Ashutosh]]></description>
		<content:encoded><![CDATA[<p>hi Pinal</p>
<p>I have executed the same on sql server 2008 and found that </p>
<p>1- First query returned same results for both columns. Results is below:-</p>
<p>D_GETDATE	D_SYSGETDATE<br />
84	                 84</p>
<p>2- Joins are also working fine.<br />
FirstDate	                            LastDate<br />
2010-07-07 06:55:32.527   2010-07-07 06:55:32.5270000<br />
2010-07-07 06:55:34.777   2010-07-07 06:55:34.7770000<br />
2010-07-07 06:55:34.027   2010-07-07 06:55:34.0270000</p>
<p>Thanks.<br />
Ashutosh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQLAuthority News – A Monthly Round Up of SQLAuthority Blog Posts Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-78213</link>
		<dc:creator><![CDATA[SQLAuthority News – A Monthly Round Up of SQLAuthority Blog Posts Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Wed, 30 Jun 2010 01:31:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-78213</guid>
		<description><![CDATA[[...] SQL SERVER – Difference Between DATETIME and DATETIME2 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER – Difference Between DATETIME and DATETIME2 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marko Parkkola</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-75769</link>
		<dc:creator><![CDATA[Marko Parkkola]]></dc:creator>
		<pubDate>Sat, 12 Jun 2010 05:29:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-75769</guid>
		<description><![CDATA[Silly of me. Of course there is implicit data type conversion happening in join. It&#039;s just from smaller data type to larger one. Now because LastDate contains more precise value (more decimals you could say) it is different from FirstDate which just gets padded by extra zeros.

Funny what comes to mind when watching cartoons at morning :)]]></description>
		<content:encoded><![CDATA[<p>Silly of me. Of course there is implicit data type conversion happening in join. It&#8217;s just from smaller data type to larger one. Now because LastDate contains more precise value (more decimals you could say) it is different from FirstDate which just gets padded by extra zeros.</p>
<p>Funny what comes to mind when watching cartoons at morning :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Difference Between DATETIME and DATETIME2 – WITH GETDATE Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-75744</link>
		<dc:creator><![CDATA[SQL SERVER – Difference Between DATETIME and DATETIME2 – WITH GETDATE Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Sat, 12 Jun 2010 01:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-75744</guid>
		<description><![CDATA[[...] blog post SQL SERVER – Difference Between GETDATE and SYSDATETIME which inspired me to write SQL SERVER &#8211; Difference Between DATETIME and DATETIME2. Now earlier two blog post inspired me to write this blog post (and 4 emails and 3 reads from [...]]]></description>
		<content:encoded><![CDATA[<p>[...] blog post SQL SERVER – Difference Between GETDATE and SYSDATETIME which inspired me to write SQL SERVER &#8211; Difference Between DATETIME and DATETIME2. Now earlier two blog post inspired me to write this blog post (and 4 emails and 3 reads from [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramdas</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-75711</link>
		<dc:creator><![CDATA[Ramdas]]></dc:creator>
		<pubDate>Fri, 11 Jun 2010 20:23:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-75711</guid>
		<description><![CDATA[Good points on what kind of date functions to use with DATETIME and DATETIME2 datatypes. Looks like really time sensitive applications/data could benefit from DATETIME2 data type.]]></description>
		<content:encoded><![CDATA[<p>Good points on what kind of date functions to use with DATETIME and DATETIME2 datatypes. Looks like really time sensitive applications/data could benefit from DATETIME2 data type.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramdas</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-75709</link>
		<dc:creator><![CDATA[Ramdas]]></dc:creator>
		<pubDate>Fri, 11 Jun 2010 20:21:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-75709</guid>
		<description><![CDATA[Hi,
Check your indexes, run queries with to get the execution plan. Check what kind of seeks/scans are performed and tune your queries. Also look at the table indexes, are they right ones based on the data/user requirements.]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
Check your indexes, run queries with to get the execution plan. Check what kind of seeks/scans are performed and tune your queries. Also look at the table indexes, are they right ones based on the data/user requirements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marko Parkkola</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-75694</link>
		<dc:creator><![CDATA[Marko Parkkola]]></dc:creator>
		<pubDate>Fri, 11 Jun 2010 17:28:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-75694</guid>
		<description><![CDATA[First, have you indexed the column? If not then you could gain significant performance boost from indexing.

Second, how much rows there are between 1-Apr-2009 to 31-Mar-2010 and how much rows are between 1-Mar-2010 and 31-Mar-2010? It could be that there&#039;s a lot of rows in the periods that are causing problems and the DB has busy time reading them from the file(s).

Something you could do is to set statistics for io on and run both queries. See what results they produce. Use MSDN to analyze those results.

http://msdn.microsoft.com/en-us/library/ms184361.aspx]]></description>
		<content:encoded><![CDATA[<p>First, have you indexed the column? If not then you could gain significant performance boost from indexing.</p>
<p>Second, how much rows there are between 1-Apr-2009 to 31-Mar-2010 and how much rows are between 1-Mar-2010 and 31-Mar-2010? It could be that there&#8217;s a lot of rows in the periods that are causing problems and the DB has busy time reading them from the file(s).</p>
<p>Something you could do is to set statistics for io on and run both queries. See what results they produce. Use MSDN to analyze those results.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms184361.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms184361.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nilam Shidne</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-75662</link>
		<dc:creator><![CDATA[Nilam Shidne]]></dc:creator>
		<pubDate>Fri, 11 Jun 2010 14:26:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-75662</guid>
		<description><![CDATA[Hello sir

I have question regarding datetime datatype.I have one view.I execute it with filter on date.But when i run it for  perticular period it slows down .For ex. If I select period 1-Apr-2009 to 31-Mar-2010 then it runs very fine but if i select period 1-Mar-2010 to 31-Mar-2010 then it becomes too slow, I tried a lot to understand the problem but could not.Can you give me the explanation?]]></description>
		<content:encoded><![CDATA[<p>Hello sir</p>
<p>I have question regarding datetime datatype.I have one view.I execute it with filter on date.But when i run it for  perticular period it slows down .For ex. If I select period 1-Apr-2009 to 31-Mar-2010 then it runs very fine but if i select period 1-Mar-2010 to 31-Mar-2010 then it becomes too slow, I tried a lot to understand the problem but could not.Can you give me the explanation?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-75594</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Fri, 11 Jun 2010 07:30:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-75594</guid>
		<description><![CDATA[Excellent Comment Marko!]]></description>
		<content:encoded><![CDATA[<p>Excellent Comment Marko!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marko Parkkola</title>
		<link>http://blog.sqlauthority.com/2010/06/11/sql-server-difference-between-datetime-and-datetime2/#comment-75580</link>
		<dc:creator><![CDATA[Marko Parkkola]]></dc:creator>
		<pubDate>Fri, 11 Jun 2010 05:44:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9217#comment-75580</guid>
		<description><![CDATA[Hi,

Sorry but I don&#039;t quite follow. I think this is normal behavior since FirstDate isn&#039;t as precise as LastDate and so it needs to be rounded.

Situation is almost the same as converting large number like FLOAT to smaller type like INT. You need to get rid of the &quot;extra&quot; bits in FLOAT in order to make it fit into INT. Plus you need to round up any decimals.

Joining works if you explicitly cast LastDate to DATETIME. I&#039;m not sure why it can&#039;t work like that implicitly, maybe there&#039;s some deeper reason I don&#039;t understand. But anyway I think it&#039;s a common problem when comparing two different data types, which vary in size, together.

Btw. Does anyone know how Sql Server gets SYSDATETIME? Does it use performance counter? I think it has to because otherwise it can&#039;t get so precise timestamps from Windows.]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Sorry but I don&#8217;t quite follow. I think this is normal behavior since FirstDate isn&#8217;t as precise as LastDate and so it needs to be rounded.</p>
<p>Situation is almost the same as converting large number like FLOAT to smaller type like INT. You need to get rid of the &#8220;extra&#8221; bits in FLOAT in order to make it fit into INT. Plus you need to round up any decimals.</p>
<p>Joining works if you explicitly cast LastDate to DATETIME. I&#8217;m not sure why it can&#8217;t work like that implicitly, maybe there&#8217;s some deeper reason I don&#8217;t understand. But anyway I think it&#8217;s a common problem when comparing two different data types, which vary in size, together.</p>
<p>Btw. Does anyone know how Sql Server gets SYSDATETIME? Does it use performance counter? I think it has to because otherwise it can&#8217;t get so precise timestamps from Windows.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
