I need to know how to compare Two timings in SQL Server
Here,
User will pass the @StatusTime as parameter for my Procedure
& i ll get the current time from my local system as follows.
Declare @CurrentTime datetime
set @CurrentTime=GetDate()
Now i need to compare these two?
Thanks in Advance

SenthilkumarPosted Apr 7, 2012, 4:24 AM
Please find the stored procedure of date comparision.
I have tested in sql server. Same you can do it from the front end.
MuthuMari MPosted Apr 7, 2012, 3:00 AM
The DATEDIFF() function returns the time between two dates.
pls refer this for samples
http://demiliani.com/blog/archive/2006/01/19/3384.aspx
http://www.w3schools.com/sql/func_datediff.asp
thanks.
If this post helps you, then mark as "Correct Answer"