<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RE: Get Records from SQL Data-SQL Server in Digital Exchange</title>
    <link>https://community.blueprism.com/t5/Digital-Exchange/Get-Records-from-SQL-Data-SQL-Server/m-p/57715#M1521</link>
    <description>&lt;P&gt;Hi &lt;SPAN&gt;Manish,&lt;BR /&gt;&lt;BR /&gt;There is nothing in the Data - SQL Server Business Object that converts dates to GMT by default. I would check;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The data in SQL Server for your query to compare the results (speak to a DBA for assistance). It may be that the data is being persisted in database in GMT (more than likely UTC).&lt;/LI&gt;
&lt;LI&gt;The Locale settings of the SQL Server instance.&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Chris&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Chris McGowan&lt;BR /&gt;Senior Technical Consultant&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Wed, 18 Nov 2020 14:26:00 GMT</pubDate>
    <dc:creator>chris.mcgowan</dc:creator>
    <dc:date>2020-11-18T14:26:00Z</dc:date>
    <item>
      <title>Get Records from SQL Data-SQL Server</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Get-Records-from-SQL-Data-SQL-Server/m-p/57714#M1520</link>
      <description>Hi Folks,&lt;BR /&gt;&lt;BR /&gt;Using this Data-SQL Server Object to connect and get data from SQL. Whenever there is any Date field it changes the time to GMT time (e.g. we are using it in Singapore which is (GMT + 8:00 hours) so, when we read records from SQL the datetime shows -8 hours from original date time)&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Let say if it's 11/11/2020 9:00 AM at Server, what we will get from BP is 11/11/2020 1:00 AM&lt;BR /&gt;&lt;BR /&gt;Any one know the fix for this other that calculating it manually and adding 8 hours in each record?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards&lt;BR /&gt;Manish&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Manish Kathuria&lt;BR /&gt;Application Devloper&lt;BR /&gt;IBM&lt;BR /&gt;America/Indiana/Indianapolis&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Nov 2020 01:49:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Get-Records-from-SQL-Data-SQL-Server/m-p/57714#M1520</guid>
      <dc:creator>ManishKathuria1</dc:creator>
      <dc:date>2020-11-18T01:49:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get Records from SQL Data-SQL Server</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Get-Records-from-SQL-Data-SQL-Server/m-p/57715#M1521</link>
      <description>&lt;P&gt;Hi &lt;SPAN&gt;Manish,&lt;BR /&gt;&lt;BR /&gt;There is nothing in the Data - SQL Server Business Object that converts dates to GMT by default. I would check;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The data in SQL Server for your query to compare the results (speak to a DBA for assistance). It may be that the data is being persisted in database in GMT (more than likely UTC).&lt;/LI&gt;
&lt;LI&gt;The Locale settings of the SQL Server instance.&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Chris&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Chris McGowan&lt;BR /&gt;Senior Technical Consultant&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Nov 2020 14:26:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Get-Records-from-SQL-Data-SQL-Server/m-p/57715#M1521</guid>
      <dc:creator>chris.mcgowan</dc:creator>
      <dc:date>2020-11-18T14:26:00Z</dc:date>
    </item>
    <item>
      <title>RE: Get Records from SQL Data-SQL Server</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Get-Records-from-SQL-Data-SQL-Server/m-p/57716#M1522</link>
      <description>Review the individual tables you are querying such as the Schedule Log, Session, or Work Queue table.&amp;nbsp; &amp;nbsp; Some tables have date columns in GMT time and some have the dates saved in the local server time (time on the database).&amp;nbsp; &amp;nbsp; Here are examples below of how I have evaluated time in my time zone (US Eastern Standard Time) where there is a need to convert the time and where there is not a need to convert the time.&amp;nbsp; &amp;nbsp;I have one database server for the environment, thus everything is in the same time zone.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Reviewing &lt;STRONG&gt;Schedule Logs&lt;/STRONG&gt; for terminations in the last 24 hours and no session was created (good to see if a Schedule terminated and may not have even created a Session) -- need to CONVERT the date time -- adjust GMT by 5 hours:&lt;BR /&gt;&lt;BR /&gt;SELECT &lt;BR /&gt;[id]&lt;BR /&gt;,[schedulelogid]&lt;BR /&gt;,[entrytype]&lt;BR /&gt;,FORMAT(([entrytime] - (RIGHT(CONVERT(datetime,SYSDATETIME()) AT TIME ZONE 'US Eastern Standard Time', 5))), 'MM-dd-yyyy hh:mm:ss tt') AS [Entry Time]&lt;BR /&gt;,[taskid]&lt;BR /&gt;,[logsessionnumber]&lt;BR /&gt;,[terminationreason]&lt;BR /&gt;,[stacktrace]&lt;BR /&gt;FROM [BLUE_PRISM_PR].[dbo].[BPAScheduleLogEntry]&lt;BR /&gt;WHERE [terminationreason] IS NOT NULL&lt;BR /&gt;AND [logsessionnumber] IS NULL &lt;BR /&gt;AND DATEDIFF(hour,(BLUE_PRISM_PR.dbo.&lt;STRONG&gt;BPAScheduleLogEntry&lt;/STRONG&gt;.&lt;STRONG&gt;entrytime&lt;/STRONG&gt; - &lt;BR /&gt;&lt;STRONG&gt;(RIGHT(CONVERT(datetime,SYSDATETIME()) AT TIME ZONE 'US Eastern Standard Time', 5))), SYSDATETIME())&lt;/STRONG&gt; &amp;lt;= 24&lt;BR /&gt;ORDER BY [entrytime] DESC&lt;BR /&gt;&lt;BR /&gt;Yet, if you are looking to see what Sessions failed in the last 24 hours (where the Schedule started a session or someone triggered a run from the Control Room manually), you &lt;SPAN style="text-decoration: underline;"&gt;do not&lt;/SPAN&gt; need to convert the time since it is presented in the local time zone:&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;SELECT &lt;BR /&gt;dbo.BPVSessionInfo.sessionnumber AS [Session ID],&lt;BR /&gt;dbo.BPVSessionInfo.processname AS [Process],&lt;BR /&gt;dbo.BPVSessionInfo.runningresourcename AS [Resource], &lt;BR /&gt;dbo.BPVSessionInfo.starterusername AS [User], &lt;BR /&gt;dbo.BPAStatus.description AS [Status],&lt;BR /&gt;FORMAT(dbo.BPVSessionInfo.startdatetime, 'MM-d-yyyy hh:mm tt') AS [Start Time],&lt;BR /&gt;FORMAT(dbo.BPVSessionInfo.enddatetime, 'MM-d-yyyy hh:mm tt') AS [End Time]&lt;BR /&gt;FROM dbo.BPVSessionInfo INNER JOIN dbo.BPAStatus ON dbo.BPVSessionInfo.statusid = dbo.BPAStatus.statusid &lt;BR /&gt;WHERE &lt;BR /&gt;dbo.BPVSessionInfo.statusid = 2&lt;BR /&gt;AND dbo.BPVSessionInfo.starterusername = '[Scheduler]' &lt;BR /&gt;AND DATEDIFF(hour, dbo.BPVSessionInfo.startdatetime, SYSDATETIME()) &amp;lt;= 24&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Brenton Westwood&lt;BR /&gt;Systems Analyst&lt;BR /&gt;Southern Company&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Nov 2020 15:10:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Get-Records-from-SQL-Data-SQL-Server/m-p/57716#M1522</guid>
      <dc:creator>bjwestwo</dc:creator>
      <dc:date>2020-11-18T15:10:00Z</dc:date>
    </item>
  </channel>
</rss>

