Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Find Number of Days

Author  Topic 

yaman
Posting Yak Master

213 Posts

Posted - 2008-06-26 : 02:01:31

Sir
I want to Find Number of days Between Two Dates .
Pls Help me Out


Yaman

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-26 : 02:25:36
read about DATEDIFF in books online.
Go to Top of Page

raky
Aged Yak Warrior

767 Posts

Posted - 2008-06-26 : 02:32:49
quote:
Originally posted by yaman


Sir
I want to Find Number of days Between Two Dates .
Pls Help me Out


Yaman



declare @fromdate datetime,@todate datetime
select @fromdate = '06/1/2008',@todate = '06/26/2008'
select datediff( dd,@fromdate,@todate)
Go to Top of Page
   

- Advertisement -