dmpippin
5/30/2013 - 8:08 PM

grabbing timestamps and changing to bigints

grabbing timestamps and changing to bigints

DECLARE @LastImportDateTime datetime
SET @LastImportDateTime = (SELECT MAX(LAST_UPDATE_TIME) FROM [SEPM].[dbo].[COMPUTER_CHECKIN_HISTORY_TEST_TABLE] where Regional_Collector = 'SEPMD01_USMW')
SELECT @LastImportDateTime

DECLARE @LastImportDateAsTimeStamp bigint
SET @LastImportDateAsTimeStamp = (Select convert(bigint,(datediff(ss,'19700101',@LastImportDateTime)))*1000)
SELECT @LastImportDateAsTimeStamp