• declare @timems numeric

    select @timems =(cast(datediff (dd,getdate()-28,getdate()) as numeric)* 86400000)

    select @timems

    --86400000 msxday