hello
try (you have to adapt a litte)
select
OH_NAME as 'object name',
OH_IDNR, OH_Client as 'Client',
AH_Status,
OH_Otype as 'object type',
AH_restart,
dateadd(hour, datediff(hour, getutcdate(), getdate()), ah_timestamp1) as Activation_time,
dateadd(hour, datediff(hour, getutcdate(), getdate()), ah_timestamp2) as start_time,
dateadd(hour, datediff(hour, getutcdate(), getdate()), ah_timestamp4) as End_time
from OH, AH
Where OH_IDNR = AH_OH_Idnr
and OH_CLIENT = xxxxx
and AH_restart = 1
and AH_TimeStamp2 BETWEEN '20241009 10:00' AND '20241010 18:00'
order by ah_timestamp2 DESC;
Marc Broussard
Equans Ineo