VBdotnet2005
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
2011-06-02 15:00:00.000
2011-11-02 15:00:00.000
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Select datediff(day,'2011-06-02 15:00:00.000','2011-11-02 15:00:00.000') +1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.