Link to home
Start Free TrialLog in
Avatar of VBdotnet2005
VBdotnet2005Flag for United States of America

asked on

total of days in sql

I want to get the total days in sql from two different dates.

2011-06-02 15:00:00.000
2011-11-02 15:00:00.000
Avatar of Aneesh
Aneesh
Flag of Canada image

SELECT DATEDIFF(dd, '2011-06-02', '2011-11-02' )
SELECT DATEDIFF(d,'2011-06-02 15:00:00.000','2011-11-02 15:00:00.000')
SOLUTION
Avatar of Simone B
Simone B
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Select datediff(day,'2011-06-02 15:00:00.000','2011-11-02 15:00:00.000') +1
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial