SQL得到当前日前毫秒数.txt

DECLARE @ms INT
DECLARE @ss BIGINT
DECLARE @passwordDate BIGINT
BEGIN
set @ss = DATEDIFF(Ss,'1970-01-01',getDate())
set @ms =  DATEPART(Ms,getDate())
set @passwordDate = @ss*1000 + @ms
           UPDATE USERS SET PASSWORDDATE= @passwordDate

END

你可能感兴趣的:(sql)