DATEDIFF (intervalstring, date1, date2)

Returns an integer corresponding to the difference according to intervalString between date1 and date2.

Valid intervals are d,dd,w,ww,m,mm,q,y,yy,yyyy,h,hh,n,s

See also: DATEADD, DATEFIFFMILLISECOND, DATEPART, DATESERIAL

Was this article helpful?
0 out of 1 found this helpful

Comments

1 comment
  • Valid interval should be enclosed in single quotes, e.g.:

    datediff('hh', StartTime, StopTime)

    0

Please sign in to leave a comment.