sql2012 equivalant

  • How can I convert this statement for sql2012 ?  DATEDIFF_BIG  The t_stamp vale from table is defined BigInt

    WHERE t_stamp >= DATEDIFF_BIG(MS, '19691231 20:00:00', GETDATE()) - (1000 * 60 * 30)

    Thanks.

  • Calculate a larger time portion, like seconds, minutes, or hours, and then multiply to get milliseconds????

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • what do I swap out for DATEDIFF_BIG ..

     

  • WHERE t_stamp >= (CAST(DATEDIFF(SECOND, '19691231 20:00:00', GETDATE()) AS bigint) * 1000) - (1000 * 60 * 30)

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.

  • Thanks Scott and Michael L John

     

     

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply