<?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 Inconsistent results with ConvertToLocalTime() in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Inconsistent-results-with-ConvertToLocalTime/m-p/2538257#M108923</link>
    <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having issues surrounding ConvertToLocalTime and the UK's DST change.&lt;/P&gt;&lt;P&gt;For clarity, the change happened on 26th October 2025.&lt;/P&gt;&lt;P&gt;Our setup is QlikSense (Cloud) to Dynamics365 Business Central via Odata v4. I am trying to build some of these queries as incremental loads (Dump, save to disk &amp;amp; on the next run, pull anything &amp;gt;= last CreatedAt time)&lt;/P&gt;&lt;P&gt;I'm running this code, which isn't overly complex, to build an Exclusion List.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LIB CONNECT TO 'BC Testing - Odata:BC Odata Connection';

RestConnectorMasterTable:
SQL SELECT 
	"__KEY_root",
	(SELECT 
		"Document_No",
        "SystemCreatedAt",
        "__FK_value"
	FROM "value" FK "__FK_value")
FROM JSON (wrap on) "root" PK "__KEY_root"
WITH CONNECTION(
	URL "$(vBaseURL)/$(vTable)?$filter=ManualDeleteReason eq 'Incorrect Order'", 
	HTTPHEADER "Authorization" "Bearer $(vAccessToken)");

_ExclusionList:
LOAD	
	distinct [Document_No]				as ExcludedOrders,
    SystemCreatedAt			as SysCreatedOrig,
    date(Timestamp(
    ConvertToLocalTime(
        Timestamp#([SystemCreatedAt], 'YYYY-MM-DDTHH:mm:ss.fffZ'),
        'Europe/London')),'DD/MM/YYYY hh:mm') as SystemCreatedAt
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_value])
order by SystemCreatedAt asc
;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and anything pre DST is converted, anything post, isn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Oggy172_0-1764926575607.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/185515i2632498AC4A1C4D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Oggy172_0-1764926575607.png" alt="Oggy172_0-1764926575607.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried using ALT, but that made no difference.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LIB CONNECT TO 'BC Testing - Odata:BC Odata Connection';

RestConnectorMasterTable:
SQL SELECT 
	"__KEY_root",
	(SELECT 
		"Document_No",
        "SystemCreatedAt",
        "__FK_value"
	FROM "value" FK "__FK_value")
FROM JSON (wrap on) "root" PK "__KEY_root"
WITH CONNECTION(
	URL "$(vBaseURL)/$(vTable)?$filter=ManualDeleteReason eq 'Incorrect Order'", 
	HTTPHEADER "Authorization" "Bearer $(vAccessToken)");

_ExclusionList:
LOAD
    distinct [Document_No]                                as ExcludedOrders,
    SystemCreatedAt                                       as SysCreatedOrig,
Date(
    ConvertToLocalTime(
        Alt(
            Timestamp#([SystemCreatedAt], 'YYYY-MM-DDThh:mm:ss[.fff]Z'),
            Timestamp#([SystemCreatedAt], 'YYYY-MM-DDThh:mm:ss[.fff]+00:00')
        ),
        'Europe/London'
    ),
    'DD/MM/YYYY hh:mm'
) as SystemCreatedAt
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_value])
ORDER BY SystemCreatedAt asc;

drop table RestConnectorMasterTable;

exit script;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use the same functions on a live table, not an archive (and so only records in the table are post DST) - the function works correctly.&lt;/P&gt;&lt;P&gt;Can anyone shed some insight? I cant afford to dump the whole archive over the API each time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Dec 2025 09:27:23 GMT</pubDate>
    <dc:creator>Oggy172</dc:creator>
    <dc:date>2025-12-05T09:27:23Z</dc:date>
    <item>
      <title>Inconsistent results with ConvertToLocalTime()</title>
      <link>https://community.qlik.com/t5/App-Development/Inconsistent-results-with-ConvertToLocalTime/m-p/2538257#M108923</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having issues surrounding ConvertToLocalTime and the UK's DST change.&lt;/P&gt;&lt;P&gt;For clarity, the change happened on 26th October 2025.&lt;/P&gt;&lt;P&gt;Our setup is QlikSense (Cloud) to Dynamics365 Business Central via Odata v4. I am trying to build some of these queries as incremental loads (Dump, save to disk &amp;amp; on the next run, pull anything &amp;gt;= last CreatedAt time)&lt;/P&gt;&lt;P&gt;I'm running this code, which isn't overly complex, to build an Exclusion List.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LIB CONNECT TO 'BC Testing - Odata:BC Odata Connection';

RestConnectorMasterTable:
SQL SELECT 
	"__KEY_root",
	(SELECT 
		"Document_No",
        "SystemCreatedAt",
        "__FK_value"
	FROM "value" FK "__FK_value")
FROM JSON (wrap on) "root" PK "__KEY_root"
WITH CONNECTION(
	URL "$(vBaseURL)/$(vTable)?$filter=ManualDeleteReason eq 'Incorrect Order'", 
	HTTPHEADER "Authorization" "Bearer $(vAccessToken)");

_ExclusionList:
LOAD	
	distinct [Document_No]				as ExcludedOrders,
    SystemCreatedAt			as SysCreatedOrig,
    date(Timestamp(
    ConvertToLocalTime(
        Timestamp#([SystemCreatedAt], 'YYYY-MM-DDTHH:mm:ss.fffZ'),
        'Europe/London')),'DD/MM/YYYY hh:mm') as SystemCreatedAt
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_value])
order by SystemCreatedAt asc
;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and anything pre DST is converted, anything post, isn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Oggy172_0-1764926575607.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/185515i2632498AC4A1C4D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Oggy172_0-1764926575607.png" alt="Oggy172_0-1764926575607.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried using ALT, but that made no difference.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LIB CONNECT TO 'BC Testing - Odata:BC Odata Connection';

RestConnectorMasterTable:
SQL SELECT 
	"__KEY_root",
	(SELECT 
		"Document_No",
        "SystemCreatedAt",
        "__FK_value"
	FROM "value" FK "__FK_value")
FROM JSON (wrap on) "root" PK "__KEY_root"
WITH CONNECTION(
	URL "$(vBaseURL)/$(vTable)?$filter=ManualDeleteReason eq 'Incorrect Order'", 
	HTTPHEADER "Authorization" "Bearer $(vAccessToken)");

_ExclusionList:
LOAD
    distinct [Document_No]                                as ExcludedOrders,
    SystemCreatedAt                                       as SysCreatedOrig,
Date(
    ConvertToLocalTime(
        Alt(
            Timestamp#([SystemCreatedAt], 'YYYY-MM-DDThh:mm:ss[.fff]Z'),
            Timestamp#([SystemCreatedAt], 'YYYY-MM-DDThh:mm:ss[.fff]+00:00')
        ),
        'Europe/London'
    ),
    'DD/MM/YYYY hh:mm'
) as SystemCreatedAt
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_value])
ORDER BY SystemCreatedAt asc;

drop table RestConnectorMasterTable;

exit script;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use the same functions on a live table, not an archive (and so only records in the table are post DST) - the function works correctly.&lt;/P&gt;&lt;P&gt;Can anyone shed some insight? I cant afford to dump the whole archive over the API each time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Dec 2025 09:27:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Inconsistent-results-with-ConvertToLocalTime/m-p/2538257#M108923</guid>
      <dc:creator>Oggy172</dc:creator>
      <dc:date>2025-12-05T09:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent results with ConvertToLocalTime()</title>
      <link>https://community.qlik.com/t5/App-Development/Inconsistent-results-with-ConvertToLocalTime/m-p/2538341#M108936</link>
      <description>&lt;P&gt;Hi, have you tried with only 'London'?, I have some apps with 'Madrid' for Spain area and noone has tagged some error (which doesn't means that it's correct, it might be than the users didn't care).&lt;/P&gt;&lt;P&gt;Also note that the invalid argument for the&amp;nbsp;&lt;SPAN&gt;ignore_dst parameter is True, but if it's not especified, it's False:&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/sense/November2025/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFunctions/converttolocaltime.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/November2025/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFunctions/converttolocaltime.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Dec 2025 19:02:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Inconsistent-results-with-ConvertToLocalTime/m-p/2538341#M108936</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2025-12-05T19:02:29Z</dc:date>
    </item>
  </channel>
</rss>

