I have tried all of these and the last scan date shows as 1970... what am i doing wrong?
SELECT [WORKSTATIONID],
[LASTAGENTSCANTIME],
DATEADD(ms, ServiceDesk.dbo.SystemInfo.LASTAGENTSCANTIME / 86400000, ServiceDesk.dbo.SystemInfo.LASTAGENTSCANTIME / 86400000 + 25567),
convert(datetime2,convert(datetime,(LASTAGENTSCANTIME /86400000)+25567)),
DATEADD(MILLISECOND, LASTAGENTSCANTIME % 1000, DATEADD(SECOND, LASTAGENTSCANTIME / 1000, '19700101')),
dateadd(s,datediff(s,GETUTCDATE() ,getdate()) + (ServiceDesk.dbo.SystemInfo.LASTAGENTSCANTIME/1000),'1970-01-01 00:00:00')
FROM [dbo].[SystemInfo]
this is the results:
2401 1730825181 1970-01-21 00:00:00.020 1970-01-21 00:00:00.0000000 1970-01-21 00:47:05.180 1970-01-20 18:47:05.000