<?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 converting a data string into time in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319185#M498976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some cases you have 105 to represent 1:05 AM without 0´s at the begining of the string. &lt;/P&gt;&lt;P&gt;In case this worked for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Len(TIME)=4 ,Time(Time#(TIME,'hhmm'),'hh:mm') ,&amp;nbsp; if(Len(TIME)=3 ,Time(Time#('0'&amp;amp;TIME,'hhmm'),'hh:mm') , if(Len(TIME)=2 ,Time(Time#('00'&amp;amp;TIME,'hhmm'),'hh:mm') , if(Len(TIME)=1 ,Time(Time#('000'&amp;amp;TIME,'hhmm'),'hh:mm') , 0 ) ) ) )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 May 2012 15:25:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-24T15:25:38Z</dc:date>
    <item>
      <title>converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319172#M498955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt; I am having trouble with trying to format my data into a time column. currently, my database returns and time value of ex: 0538AM meaning 5:38 AM. i am doing an analysis based on time and i need to convert my data into somthing that is usable, preferably in the form of hh:mm. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried using the following functions: time, time#, num#, num, timestamp, and timestamp# to give me usable data but it only seems to return null or 12:00 AM values. an example of the code i have been trying is: time(num#(mid(time1,1,4))). when i use the code without the time function in front i get results like this: 0538.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;Thanks so much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 18:13:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319172#M498955</guid>
      <dc:creator />
      <dc:date>2011-07-29T18:13:34Z</dc:date>
    </item>
    <item>
      <title>converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319173#M498956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use time() function to format a time / date field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you still want to get one, so I think you should try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;time#(mid(time1,1,4),'hhmm')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or time#(time1,'hhmmtt')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can format this to e.g. hh:mm format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;time(time#(time1,'hhmmtt'),'hh:mm')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; {hhmmtt should be the correct format code for your input, please refer to and check the format code page in the help}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 18:21:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319173#M498956</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-29T18:21:15Z</dc:date>
    </item>
    <item>
      <title>converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319174#M498958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried that but it still gives me the same problem were all the times returned are 12:00:00 AM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestion&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 19:03:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319174#M498958</guid>
      <dc:creator />
      <dc:date>2011-07-29T19:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319175#M498960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The solution given be Stefan worked for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-size: 8pt; font-family: courier new,courier;"&gt;Time(Time#('0538AM','hhmmTT'),'hh:mm') returned 05:38&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-size: 8pt; font-family: courier new,courier;"&gt;Time(Time#('0538PM','hhmmTT'),'hh:mm') returned 17:38&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #ff0000;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 19:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319175#M498960</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2011-07-29T19:42:01Z</dc:date>
    </item>
    <item>
      <title>converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319176#M498961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also double checked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get 12:00:00 AM if I use&lt;/P&gt;&lt;P&gt;=time(num#(mid('0514am',1,4)))&lt;/P&gt;&lt;P&gt;or null using&lt;/P&gt;&lt;P&gt;=time(time#(mid('0514am',1,4)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. if I forget the format code for the string parsing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=time(time#(mid('0514am',1,4),'hhmm'))&lt;/P&gt;&lt;P&gt;gives a correct time format depending on your system settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have still troubles, it it possible for you to upload a sample file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 20:25:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319176#M498961</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-29T20:25:28Z</dc:date>
    </item>
    <item>
      <title>converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319177#M498963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; how do i upload the file to the discussion? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 18:52:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319177#M498963</guid>
      <dc:creator />
      <dc:date>2011-08-01T18:52:50Z</dc:date>
    </item>
    <item>
      <title>converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319178#M498964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is an upload function in advanced editor (link upper right corner of editor).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 18:58:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319178#M498964</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-01T18:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319179#M498966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks i got it now. Im pretty new to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is a sample file of the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matthew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 19:39:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319179#M498966</guid>
      <dc:creator />
      <dc:date>2011-08-01T19:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319180#M498968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've added a listbox with expression to convert string TIME to a real time format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be able to use that also in the script (without your data sources, I couldn't check).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 19:49:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319180#M498968</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-01T19:49:21Z</dc:date>
    </item>
    <item>
      <title>converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319181#M498969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; would you mind posting the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not working on my copy of QV today but on an unregistered version so I cannot open the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That would be much appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 19:54:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319181#M498969</guid>
      <dc:creator />
      <dc:date>2011-08-01T19:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319182#M498971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might have an idea what your problem was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you used Time1 (the resulting number after string parsing) for time functions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this will not work, time is encoded as decimal places after the whole number, e.g 09:00 am 0.375.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, you parsed 900 into Time1 as a number, this results always to 12:00 AM, because there are no decimal places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 20:01:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319182#M498971</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-01T20:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319183#M498973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, here you are:&lt;/P&gt;&lt;P&gt;=time(time#(TIME,'hhmmtt'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 20:03:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319183#M498973</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-01T20:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319184#M498974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;So i ended up using a code similar to the one you suggested in addition to the information you gave me about how QV operates with its time function.&lt;BR /&gt;time#(time((num#(Left(TIME,4))/2400),'hhmmtt'),'HHMM')&lt;/P&gt;&lt;P&gt;Thanks for all of your help. I think this solves my problem.&lt;BR /&gt; Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 20:39:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319184#M498974</guid>
      <dc:creator />
      <dc:date>2011-08-01T20:39:25Z</dc:date>
    </item>
    <item>
      <title>converting a data string into time</title>
      <link>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319185#M498976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some cases you have 105 to represent 1:05 AM without 0´s at the begining of the string. &lt;/P&gt;&lt;P&gt;In case this worked for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Len(TIME)=4 ,Time(Time#(TIME,'hhmm'),'hh:mm') ,&amp;nbsp; if(Len(TIME)=3 ,Time(Time#('0'&amp;amp;TIME,'hhmm'),'hh:mm') , if(Len(TIME)=2 ,Time(Time#('00'&amp;amp;TIME,'hhmm'),'hh:mm') , if(Len(TIME)=1 ,Time(Time#('000'&amp;amp;TIME,'hhmm'),'hh:mm') , 0 ) ) ) )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 15:25:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/converting-a-data-string-into-time/m-p/319185#M498976</guid>
      <dc:creator />
      <dc:date>2012-05-24T15:25:38Z</dc:date>
    </item>
  </channel>
</rss>

