Getting Only The Date Part Of A Date/Time Stamp in SQL Server (Revisited)

<!---
	When selecting the hit information, we are going to
	get a Date-Only column for the date created using our
	traditional CAST / FLOOR methdology.
--->
<cftimer
	type="outline"
	label="Date-Only Using CAST">
 
	<!--- Query for Hit information. --->
	<cfquery name="qHit" datasource="#REQUEST.DSN.Source#">
		SELECT
			h.id,
			h.date_created,
			(
				CAST(
					FLOOR(
						CAST(
							h.date_created
							AS FLOAT
						)
					)
					AS DATETIME
				)
			) AS date_only_created
		FROM
			web_stats_hit h
	</cfquery>
 
 
	<!--- Output the first record. --->
	#qHit.RecordCount#<br />
	#qHit.date_created#<br />
	#qHit.date_only_created#<br />
 
</cftimer>
 
 
<!---
	When selecting the hit information, we are going to
	get a Date-Only column for the date created using our
	new DATEADD / DATEDIFF methodology.
--->
<cftimer
	type="outline"
	label="Date-Only Using DATEADD / DATEDIFF">
 
	<!--- Query for Hit information. --->
	<cfquery name="qHit" datasource="#REQUEST.DSN.Source#">
		SELECT
			h.id,
			h.date_created,
			(
				DATEADD(
					DD,
					0,
					DATEDIFF(
						DD,
						0,
						h.date_created
					)
				)
			) AS date_only_created
		FROM
			web_stats_hit h
	</cfquery>
 
 
	<!--- Output the first record. --->
	#qHit.RecordCount#<br />
	#qHit.date_created#<br />
	#qHit.date_only_created#<br />
 
</cftimer>

For Cut-and-Paste