tigars39 (8/1/2013)
Sean: dont know my friend. I was still trying to find more infos about the Timestamp_ID.Thanks for the hints Lowell!
Chris, i think thats what i needed my friend!. Now the question is,(sorry for the noob question) how do i insert your conversion code into the following query:
SELECT HST_Currents.Timestamp_ID, Devices.name, Topics.short_name, Topics.name AS Expr1, Topics.short_units, Topics.description,
HST_Currents.Original_Value
FROM Devices INNER JOIN
HST_Currents ON Devices.local_Device_ID = HST_Currents.Device_ID INNER JOIN
LoggedItems ON Devices.local_Device_ID = LoggedItems.Device_ID INNER JOIN
Topics ON HST_Currents.Topic_ID = Topics.topic_ID AND LoggedItems.Topic_ID = Topics.topic_ID
Just add it into the select clause
SELECT
HST_Currents.Timestamp_ID, Devices.name, Topics.short_name, Topics.name AS Expr1, Topics.short_units, Topics.description,
HST_Currents.Original_Value,
DATEADD(s,(HST_Currents.Timestamp_id - 624511296000000000) / 10000000,'19800101') AS TimeStampDateTime
FROM Devices INNER JOIN
HST_Currents ON Devices.local_Device_ID = HST_Currents.Device_ID INNER JOIN
LoggedItems ON Devices.local_Device_ID = LoggedItems.Device_ID INNER JOIN
Topics ON HST_Currents.Topic_ID = Topics.topic_ID AND LoggedItems.Topic_ID = Topics.topic_ID