Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI OLEDB Enterprise

Retrieve interpolated values using UTC mode and report UTC and local time

Retrieve interpolated values using UTC mode and report UTC and local time

  • Last UpdatedFeb 07, 2023
  • 1 minute read

Connection string must include Time Zone = UTC:

SELECT eh.Name Element, ea.Name Attribute, i.Value, i.Time,
tolocaldate (i.Time ) Localtime , (tolocaldate (i.Time ) - i.Time ) deltaDST
FROM NuGreen.Asset.ElementHierarchy eh
INNER JOIN NuGreen.Asset.ElementAttribute ea ON ea.ElementID = eh.ElementID
CROSS APPLY NuGreen.Data.InterpolateRange (ea.ID , localdate (N'25-Oct-2015'),
localdate (N'25-Oct-2015 04:00:00'), N'1h') i
WHERE eh.Path = N'\NuGreen\Houston\Cracking Process\Equipment\'
AND ea .Name like 'Fuel Gas Flow'
AND eh .Name = 'B-210'
OPTION (FORCE ORDER)

Sample result in (UTC+1)

TitleResults for “How to create a CRG?”Also Available in