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) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • 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