<?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: Timestamp conversion in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500234#M692575</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was enough to lead me on the right path. I hoped for an example but I got it quite well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this to create my timestamp:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;timestamp(Timestamp#([Date/Time],'YYYY/MM/DD hh:mm TT' ),'DD.MM.YYYY hh:mm') as timestamp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One question the expression above with just timestamp# generated a numeric value, easiest to see by the orientation in a table.(left is default for strings and right for numeric values). But when I look on table viewer preview, I just see the normal timestamp as string?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Aug 2013 10:11:53 GMT</pubDate>
    <dc:creator>peschu123</dc:creator>
    <dc:date>2013-08-16T10:11:53Z</dc:date>
    <item>
      <title>Timestamp conversion</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500229#M692570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following field in my database:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Date/Time] with format YYYY/MM/DD hh:mm PM --&amp;gt; "2012/09/17 11:31 PM" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First I want to convert this to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Date/Time] with format: DD.MM.YYYY hh:mm --&amp;gt; ""17.09.2012 23:31"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further I have to adjust the time from Eastern Time (GMT -4) to GMT + 2 (+6 hours). Is there a function for that. Or do I have to calculate it by extracting the hour and adding 6 hours?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that I want to extract year,month,day, time(hour would be enough).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to admit I have some problems understanding the syntax of the date(formatting) functions. Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 09:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500229#M692570</guid>
      <dc:creator>peschu123</dc:creator>
      <dc:date>2013-08-16T09:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp conversion</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500230#M692571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From Help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;STRONG&gt;&lt;SPAN class="Bold"&gt;LocalTime(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;[timezone [, ignoreDST ]]&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P&gt;Returns a &lt;SPAN class="Italic"&gt;timestamp&lt;/SPAN&gt; of the current time from the system clock for a specified time zone. The &lt;SPAN class="Italic"&gt;timezone&lt;/SPAN&gt; is specified as a string containing any of the geographical places listed under &lt;SPAN class="Bold"&gt;Time Zone&lt;/SPAN&gt; in the &lt;SPAN class="Bold"&gt;Windows Control Panel&lt;/SPAN&gt; for &lt;SPAN class="Bold"&gt;Date and Time&lt;/SPAN&gt; or as a string in the form 'GMT+hh:mm' or 'UTC+hh:mm'. If no timezone is specified the local time will be returned. If &lt;SPAN class="Italic"&gt;ignoreDST&lt;/SPAN&gt; is -1 (true) daylight savings time will be ignored. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;&lt;CODE&gt;localtime ('Paris')&lt;/CODE&gt; &lt;/P&gt;&lt;P class="Code"&gt;&lt;CODE&gt;localtime ('GMT+01:00')&lt;/CODE&gt; &lt;/P&gt;&lt;P class="Code"&gt;&lt;CODE&gt;localtime ('Paris',-1)&lt;/CODE&gt; &lt;/P&gt;&lt;P class="Code"&gt;&lt;CODE&gt;localtime()&lt;/CODE&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 09:15:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500230#M692571</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-08-16T09:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp conversion</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500231#M692572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should use Timestamp#() function to parse your string into a QV timestamp with a numeric representation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use ConvertToLocalTime() to adjust your timezone and then use Hour(), Day(), Month(), Year() function to retrieve the information you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Timestamp() function to format your timestamp to a different format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 09:15:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500231#M692572</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-08-16T09:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp conversion</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500232#M692573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;interesting to see 2 master have different answer on same question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 09:21:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500232#M692573</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2013-08-16T09:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp conversion</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500233#M692574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know in which way the excerpt from the help should help me. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Especially when I already said that I don't really get it with those functions. This further implies that I have already used the help...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 09:54:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500233#M692574</guid>
      <dc:creator>peschu123</dc:creator>
      <dc:date>2013-08-16T09:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp conversion</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500234#M692575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was enough to lead me on the right path. I hoped for an example but I got it quite well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this to create my timestamp:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;timestamp(Timestamp#([Date/Time],'YYYY/MM/DD hh:mm TT' ),'DD.MM.YYYY hh:mm') as timestamp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One question the expression above with just timestamp# generated a numeric value, easiest to see by the orientation in a table.(left is default for strings and right for numeric values). But when I look on table viewer preview, I just see the normal timestamp as string?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 10:11:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500234#M692575</guid>
      <dc:creator>peschu123</dc:creator>
      <dc:date>2013-08-16T10:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp conversion</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500235#M692576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try as following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Timestamp([Date/Time] , 'DD.MM.YYYY hh:mm' )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Then to add 6 hours :&lt;/SPAN&gt;&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; TimeStamp([Date/Time] + Time#(6,'hh') , 'DD.MM.YYYY hh:mm')&amp;nbsp; as LocalTime&amp;nbsp;&amp;nbsp; // gives your local time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use Hour(), Month(), Year() functions on this LocalTime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 10:17:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500235#M692576</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-08-16T10:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp conversion</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500236#M692577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you too tres qv for the help. I was a bit confused by the functions or a bit afraid, but it seems to be pretty easy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the following expression to directly show the me the correct result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ConvertToLocalTime(timestamp(Timestamp#([Date/Time],'YYYY/MM/DD hh:mm TT' ),'DD.MM.YYYY hh:mm'),'GMT+06:00') as timestamp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to use GMT+06:00 because QV assumes that the timestamp is gmt?! I don't know how to change this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What means [.fff] in timestampformat? Sometimes the help isn't that helpful it should..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT thank you all for your fast help. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: It even works perfectly without timestamp(). But I think in some cases it could be an advantage to define the format.&lt;/P&gt;&lt;P&gt;The formula than is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ConvertToLocalTime(Timestamp#([Date/Time],'YYYY/MM/DD hh:mm TT' ),'GMT+06:00') as timestamp,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 10:31:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500236#M692577</guid>
      <dc:creator>peschu123</dc:creator>
      <dc:date>2013-08-16T10:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp conversion</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500237#M692578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;.fff -&amp;gt; fraction to miliseconds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 10:36:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500237#M692578</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-08-16T10:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp conversion</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500238#M692579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok tres qv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And sorry for my first reply to your post, I interpreted that as something like "RTFM!".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I read my initial post again and now I think it just should be a hint to this function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have nice day and thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 10:49:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500238#M692579</guid>
      <dc:creator>peschu123</dc:creator>
      <dc:date>2013-08-16T10:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp conversion</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500239#M692580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;, It's alright, you have got the solution, that is more important. Have a nice day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 10:54:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-conversion/m-p/500239#M692580</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-08-16T10:54:46Z</dc:date>
    </item>
  </channel>
</rss>

