<?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: Convert EST Expression to Local Time Zone (CST) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Convert-EST-Expression-to-Local-Time-Zone-CST/m-p/106208#M761972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try with these:&lt;/P&gt;&lt;P&gt;Examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ConvertToLocalTime(’2007-11-10 23:59:00’,’Paris’) returns ’2007-11-11 00:59:00’ and the corresponding internal timestamp representation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ConvertToLocalTime(UTC(), ’GMT-05:00’) returns the time for the North American east coast, e.g. New York. &lt;/P&gt;&lt;P&gt;ConvertToLocalTime(Date, 'GMT-06:00') as DateConverted;&lt;/P&gt;&lt;P&gt;converttolocaltime(converttolocaltime(fieldname,'UTC'),'Pacific Time (USA &amp;amp; Canada)');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABC:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ConvertToLocalTime( Date, 'Central Time (US &amp;amp; Canada)') as DateConverted;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date#( SDATE, 'YYYY-MM-DD hh:mm:ss') as Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could try it with the function converttolocaltime() but if you have only a few timezone offsets then you could simply add the hour-offset to your LoginTime, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LoginTime + (1/24 * pick(match(TimeZone, 2, 3), 5, -7))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/DateAndTimeFunctions/converttolocaltime.htm?q=converttolocaltime" rel="nofollow" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/DateAndTimeFunctions/converttolocaltime.htm?q=converttolocaltime&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Aug 2018 13:05:21 GMT</pubDate>
    <dc:creator>BalaBhaskar_Qlik</dc:creator>
    <dc:date>2018-08-04T13:05:21Z</dc:date>
    <item>
      <title>Convert EST Expression to Local Time Zone (CST)</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-EST-Expression-to-Local-Time-Zone-CST/m-p/106207#M761971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use an expression to get the datetime out of two separate&lt;STRONG&gt; numeric fields&lt;/STRONG&gt; of date and time which is EST. How do I convert them to local timezone of Central US time? The expression I use gives me time in EST. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression I use is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Timestamp((DATE) + (Interval(Floor(Time#(Num(TIME_STRING, '000000'), 'hhmmss'),1/24), 'hh'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;,'MM/DD/YYYY hh TT')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried two methods to get it in CST but it did not give me the desired result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I used the ConvertToLocalTime function but it messes up the times. Probably I need to convert into some standard format before applying this? Not sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I subtract an hour from above expression using -1/24,'MM/DD/YYYY - hh TT'), but the problem here is when I create a table with the datetime field, I get 11 PM of the previous day in the list when I should show it from 12 AM today (1PM EST) instead as data is technically 'today's data'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if there is an alternative method. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-EST-Expression-to-Local-Time-Zone-CST/m-p/106207#M761971</guid>
      <dc:creator>haneeshmarella</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert EST Expression to Local Time Zone (CST)</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-EST-Expression-to-Local-Time-Zone-CST/m-p/106208#M761972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try with these:&lt;/P&gt;&lt;P&gt;Examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ConvertToLocalTime(’2007-11-10 23:59:00’,’Paris’) returns ’2007-11-11 00:59:00’ and the corresponding internal timestamp representation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ConvertToLocalTime(UTC(), ’GMT-05:00’) returns the time for the North American east coast, e.g. New York. &lt;/P&gt;&lt;P&gt;ConvertToLocalTime(Date, 'GMT-06:00') as DateConverted;&lt;/P&gt;&lt;P&gt;converttolocaltime(converttolocaltime(fieldname,'UTC'),'Pacific Time (USA &amp;amp; Canada)');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABC:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ConvertToLocalTime( Date, 'Central Time (US &amp;amp; Canada)') as DateConverted;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date#( SDATE, 'YYYY-MM-DD hh:mm:ss') as Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could try it with the function converttolocaltime() but if you have only a few timezone offsets then you could simply add the hour-offset to your LoginTime, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LoginTime + (1/24 * pick(match(TimeZone, 2, 3), 5, -7))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/DateAndTimeFunctions/converttolocaltime.htm?q=converttolocaltime" rel="nofollow" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/DateAndTimeFunctions/converttolocaltime.htm?q=converttolocaltime&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Aug 2018 13:05:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-EST-Expression-to-Local-Time-Zone-CST/m-p/106208#M761972</guid>
      <dc:creator>BalaBhaskar_Qlik</dc:creator>
      <dc:date>2018-08-04T13:05:21Z</dc:date>
    </item>
  </channel>
</rss>

