Reputation: 549
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?
Upvotes: 47
Views: 146056
Reputation: 7892
how about trying this, not sure why you have stime = [exceptions2].starttime and etime = [exceptions2].endtime
SELECT datediff(minute, starttime, endtime) from Exceptions2
Upvotes: 74