View Single Post
  #2 (permalink)  
Old May 8th, 2007, 06:38 AM
happygv happygv is offline
Friend of Wrox
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post

Do you define the start and end dates to calculate the number of days? If so
DECLARE @StartDate datetime, @EndDate datetime
SET @StartDate = '2007-01-01'
SET @EndDate = '2007-05-01'

SELECT DateDiff(d, @StartDate, @EndDate)
Which returns 120. Does this helps?


- Vijay G
Strive for Perfection
Reply With Quote