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
Default

Do you define the start and end dates to calculate the number of days? If so
Code:
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?

Cheers

_________________________
- Vijay G
Strive for Perfection
Reply With Quote