<?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 Select and convert (apply) timezone (offset) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Select-and-convert-apply-timezone-offset/m-p/2475887#M100204</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;We have data where all timestamps are in the GMT+0 time zone.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;We have simple data visualization: sheet with tables that, among other things, have columns that display the values ​​of those timestamp fields.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;We would like to have a filter-list of timezones or offsets (GMT+0, GMT+1, GMT+2 ... ) so that when you select one - to convert the timezone or apply an offset to those timestamp-fields (on for example, if you select GMT+8, then a -8 hour offset would be applied). &lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;Is something like this possible in Qlik?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;---------------------------------------------------&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;EDIT: Even this would suit us (if possible): For example, the user can enter a number somewhere and that number of hours is added to the existing values ​​of the timestamp field.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Aug 2024 15:38:09 GMT</pubDate>
    <dc:creator>RoyBatty</dc:creator>
    <dc:date>2024-08-12T15:38:09Z</dc:date>
    <item>
      <title>Select and convert (apply) timezone (offset)</title>
      <link>https://community.qlik.com/t5/App-Development/Select-and-convert-apply-timezone-offset/m-p/2475887#M100204</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;We have data where all timestamps are in the GMT+0 time zone.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;We have simple data visualization: sheet with tables that, among other things, have columns that display the values ​​of those timestamp fields.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;We would like to have a filter-list of timezones or offsets (GMT+0, GMT+1, GMT+2 ... ) so that when you select one - to convert the timezone or apply an offset to those timestamp-fields (on for example, if you select GMT+8, then a -8 hour offset would be applied). &lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;Is something like this possible in Qlik?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;---------------------------------------------------&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;EDIT: Even this would suit us (if possible): For example, the user can enter a number somewhere and that number of hours is added to the existing values ​​of the timestamp field.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 15:38:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Select-and-convert-apply-timezone-offset/m-p/2475887#M100204</guid>
      <dc:creator>RoyBatty</dc:creator>
      <dc:date>2024-08-12T15:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select and convert (apply) timezone (offset)</title>
      <link>https://community.qlik.com/t5/App-Development/Select-and-convert-apply-timezone-offset/m-p/2498448#M102883</link>
      <description>&lt;P&gt;Yes, this is definitely possible in Qlik Sense!&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Step 1: Load the Timestamps Properly&lt;/H3&gt;
&lt;P&gt;Ensure your timestamps are loaded in the correct format. For example:&lt;/P&gt;
&lt;PRE class="!overflow-visible"&gt;&lt;CODE class="!whitespace-pre hljs language-qlik"&gt;Data:
LOAD 
    Timestamp(TimestampField, 'YYYY-MM-DD hh:mm:ss') AS OriginalTimestamp
FROM [YourDataSource];&lt;/CODE&gt;&lt;/PRE&gt;
&lt;H3&gt;&lt;BR /&gt;Step 2: Create a Variable for the Offset&lt;/H3&gt;
&lt;P&gt;Create a variable, e.g., &lt;CODE&gt;vTimezoneOffset&lt;/CODE&gt;, with a default value of &lt;CODE&gt;0&lt;/CODE&gt;. This variable will represent the number of hours to offset from GMT+0.&lt;/P&gt;
&lt;H3&gt;&lt;BR /&gt;Step 3: Adjust the Timestamp Dynamically&lt;/H3&gt;
&lt;P&gt;Use the following expression to calculate the adjusted timestamp:&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;PRE class="!overflow-visible"&gt;&lt;CODE class="!whitespace-pre hljs language-qlik"&gt;=Timestamp(OriginalTimestamp + $(vTimezoneOffset)/24)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This adds the offset (in hours) to your &lt;CODE&gt;OriginalTimestamp&lt;/CODE&gt;. For example, entering &lt;CODE&gt;2&lt;/CODE&gt; in the offset variable will shift the timestamp by 2 hours.&lt;/P&gt;
&lt;H3&gt;&lt;BR /&gt;Step 4: Add User Input&lt;/H3&gt;
&lt;H4&gt;Option A: Direct Input&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;Add a &lt;STRONG&gt;Variable Input&lt;/STRONG&gt; object to your sheet and link it to &lt;CODE&gt;vTimezoneOffset&lt;/CODE&gt;.&lt;/LI&gt;
&lt;LI&gt;Users can enter a custom number (e.g., &lt;CODE&gt;8&lt;/CODE&gt; for GMT+8 or &lt;CODE&gt;-5&lt;/CODE&gt; for GMT-5), and the adjusted timestamp will update dynamically.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H4&gt;Option B: Predefined Timezones (Simplified)&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;Use a &lt;STRONG&gt;Variable Input&lt;/STRONG&gt; object with the &lt;STRONG&gt;Dropdown&lt;/STRONG&gt; option.&lt;/LI&gt;
&lt;LI&gt;Define the dropdown options as:
&lt;UL&gt;
&lt;LI&gt;Name: &lt;CODE&gt;GMT+0&lt;/CODE&gt;, Value: &lt;CODE&gt;0&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Name: &lt;CODE&gt;GMT+1&lt;/CODE&gt;, Value: &lt;CODE&gt;1&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Name: &lt;CODE&gt;GMT+2&lt;/CODE&gt;, Value: &lt;CODE&gt;2&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Name: &lt;CODE&gt;GMT-1&lt;/CODE&gt;, Value: &lt;CODE&gt;-1&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Name: &lt;CODE&gt;GMT-8&lt;/CODE&gt;, Value: &lt;CODE&gt;-8&lt;/CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Link it to &lt;CODE&gt;vTimezoneOffset&lt;/CODE&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;BR /&gt;This allows users to select a timezone directly from a predefined list, and the adjusted timestamp will update accordingly.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 03:57:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Select-and-convert-apply-timezone-offset/m-p/2498448#M102883</guid>
      <dc:creator>nhenckel</dc:creator>
      <dc:date>2024-12-18T03:57:48Z</dc:date>
    </item>
  </channel>
</rss>

