SELECT convert(datetime,min(startDate)) - convert(datetime,max(endDate)) from projects
SELECT DATEDIFF(DAY, Convert(datetime,MIN([date])),CONVERT(datetime,MAX([date]))) AS NumberOfDays from tablename
SELECT ABS(DATEDIFF(DAY, MIN([startdate]),MAX([enddate])) AS NumberOfDays from tablename
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)