compare two dates | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

compare two dates

declare @temp datetime
set @temp=’2/18/2004′ with system date With Regards
Aruna Mathew
GETDATE() will return the current server date and time value. Look that up in books on line. Dalton
declare @temp datetime
set @temp=’2004-02-18′
if @temp=dateadd(day,datediff(day,0,getdate()),0)
Print ‘Same’
else
Print ‘Not Same’ Also Refer
http://www.sql-server-performance.com/fk_datetime.asp
Madhivanan Failing to plan is Planning to fail
]]>