Skip to content
Advertisement

using DateDiff to find duration in minutes

I am trying to use Datediff to find out the duration between columnA and columnB.

SELECT datediff (minute, stime, etime)
from Exceptions2
where stime = [exceptions2].starttime
and etime = [exceptions2].endtime

This produces errors. Can anyone please help me with what I’m doing wrong?

Advertisement

Answer

how about trying this, not sure why you have stime = [exceptions2].starttime and etime = [exceptions2].endtime

SELECT datediff(minute, starttime, endtime) from Exceptions2

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement