• eobiki10 (12/5/2013)


    Hi All,

    Can someone help me interpret what this code is doing.

    open_date BETWEEN DATEADD(mm, DATEDIFF(mm, 0, GETDATE()) - 1, 0) AND DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0) - '00:00:01'

    and is there another way to re-write it.

    EO

    It looks to me like it's part of a WHERE clause that filters for rows where open_date is in the current month including time of day.