Home Forums Article Discussions Article Discussions by Author Discuss Content Posted by Jeff Moden Calculating Duration Using DATETIME Start and End Dates (SQL Spackle) RE: Calculating Duration Using DATETIME Start and End Dates (SQL Spackle)
Danny Norton
Valued Member
Points: 64
More actions
January 20, 2014 at 1:57 pm
#1681666
Thanks Chris, that helps a lot!
So I'm understanding now that starting at 0 and ending at the difference [ie. DATEDIFF(hh,0,@EndDT-@StartDT)] allows the query to work when the hour part of @StartDT is larger than the hour part of @EndDT.