<?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: Tidy up date/time field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Tidy-up-date-time-field/m-p/408465#M151908</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Timestamp#(left(YOURFIELD,19),'YYYY-MM-DD hh:mm:ss')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should do the job to interpet the input value as timestamp (Hm, one thing I was too lazy about in my first answer: do you need to handle different timezones (the + 01:00 part) in your input string?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal use numeric value will still be different if the millisecond part is different (values you called duplicates, I think). The other two timestamp functions are used to get rid of the duplicates (first change the text format to the desired format, then interpret this text (without the milliseconds) as new numeric value).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Oct 2012 11:18:06 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-10-12T11:18:06Z</dc:date>
    <item>
      <title>Tidy up date/time field</title>
      <link>https://community.qlik.com/t5/QlikView/Tidy-up-date-time-field/m-p/408462#M151905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you advise on the best way to format the below so it shows as DD/MM/YYYY hh:mm:ss - and clear the duplicates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2012-09-28 17:46:10:649 + 01:00&lt;/P&gt;&lt;P&gt;2012-09-28 17:46:10:659 + 01:00&lt;/P&gt;&lt;P&gt;2012-09-28 17:46:10:662 + 01:00&lt;/P&gt;&lt;P&gt;2012-09-28 17:46:10:670 + 01:00&lt;/P&gt;&lt;P&gt;2012-09-28 17:46:10:672 + 01:00&lt;/P&gt;&lt;P&gt;2012-09-28 17:46:10:676 + 01:00&lt;/P&gt;&lt;P&gt;2012-09-28 17:46:10:678 + 01:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Dayna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 10:56:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tidy-up-date-time-field/m-p/408462#M151905</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2012-10-12T10:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Tidy up date/time field</title>
      <link>https://community.qlik.com/t5/QlikView/Tidy-up-date-time-field/m-p/408463#M151906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to do it like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;timestamp#(timestamp(Timestamp#(left('2012-09-28 17:46:10:649 + 01:00',19),'YYYY-MM-DD hh:mm:ss'),'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY hh:mm:ss') as NEWFIELD&lt;/EM&gt;&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;&lt;EM&gt;timestamp#(timestamp(Timestamp#(left(YOURFIELD,19),'YYYY-MM-DD hh:mm:ss'),'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY hh:mm:ss') as NEWFIELD&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;or if your standard timestamp format matches the required format, just:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;timestamp#(timestamp(Timestamp#(left(YOURFIELD,19),'YYYY-MM-DD hh:mm:ss'))) as NEWFIELD&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 11:07:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tidy-up-date-time-field/m-p/408463#M151906</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-12T11:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Tidy up date/time field</title>
      <link>https://community.qlik.com/t5/QlikView/Tidy-up-date-time-field/m-p/408464#M151907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your response! Why do you need the additional two timestamp's? Would Timestamp#(left(YOURFIELD,19),'YYYY-MM-DD hh:mm:ss') do the job? If you could explain the first two timestamps and why you did it that way, it would be appreciated - as I do struggle with date/time formatting!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Dayna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 11:11:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tidy-up-date-time-field/m-p/408464#M151907</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2012-10-12T11:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Tidy up date/time field</title>
      <link>https://community.qlik.com/t5/QlikView/Tidy-up-date-time-field/m-p/408465#M151908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Timestamp#(left(YOURFIELD,19),'YYYY-MM-DD hh:mm:ss')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should do the job to interpet the input value as timestamp (Hm, one thing I was too lazy about in my first answer: do you need to handle different timezones (the + 01:00 part) in your input string?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal use numeric value will still be different if the millisecond part is different (values you called duplicates, I think). The other two timestamp functions are used to get rid of the duplicates (first change the text format to the desired format, then interpret this text (without the milliseconds) as new numeric value).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 11:18:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tidy-up-date-time-field/m-p/408465#M151908</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-12T11:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Tidy up date/time field</title>
      <link>https://community.qlik.com/t5/QlikView/Tidy-up-date-time-field/m-p/408466#M151909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might need to take into consideration the +01:00 - would that be possible?&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;Kind Regards,&lt;/P&gt;&lt;P&gt;Dayna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 12:27:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tidy-up-date-time-field/m-p/408466#M151909</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2012-10-12T12:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Tidy up date/time field</title>
      <link>https://community.qlik.com/t5/QlikView/Tidy-up-date-time-field/m-p/408467#M151910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Should be possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a QV function to convert a timestamp to local time:&lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor524"&gt;&lt;/A&gt;&lt;A name="ConvertToLocalTime("&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;ConvertToLocalTime(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;timestamp [, place [, ignore_dst=false]]&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P class="syntax"&gt;There are some few threads that talk about time zone handling, e.g.&lt;/P&gt;&lt;P class="syntax"&gt;&lt;A _jive_internal="true" class="loading active_link" href="https://community.qlik.com/thread/40060" title="http://community.qlik.com/thread/40060"&gt;http://community.qlik.com/thread/40060&lt;/A&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P class="syntax"&gt;If you have problems, I could help you maybe next week.&lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P class="syntax"&gt;Regards,&lt;/P&gt;&lt;P class="syntax"&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 16:37:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tidy-up-date-time-field/m-p/408467#M151910</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-12T16:37:54Z</dc:date>
    </item>
  </channel>
</rss>

