<?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 Changing date for a certain time span in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Changing-date-for-a-certain-time-span/m-p/177016#M44789</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your timestamp is formatted as a string, it's very difficult operating with it. I'd recommend casting it into a proper timestamp, using one of the "Interpretation functions" (search Help for this name) for example:&lt;/P&gt;&lt;P&gt;myTime = time#(Timestring, 'hh:mm:ss')&lt;/P&gt;&lt;P&gt;Once you convert your strings into proper time or timestamp fields, you can operate with them as with numbers:&lt;/P&gt;&lt;P&gt;1 day = 1&lt;/P&gt;&lt;P&gt;1 hour = 1/24&lt;/P&gt;&lt;P&gt;8:00 AM corresponds to 8/24 = 1/3&lt;/P&gt;&lt;P&gt;2:00 PM = 14:00, corresponds to 14/24 = 7/12&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Mar 2011 16:20:51 GMT</pubDate>
    <dc:creator>Oleg_Troyansky</dc:creator>
    <dc:date>2011-03-23T16:20:51Z</dc:date>
    <item>
      <title>Changing date for a certain time span</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-date-for-a-certain-time-span/m-p/177015#M44788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;Basically I am looking at a time stamp and saying if this field is after 2pm or before 8 am the make the date associated with it one day earlier.&lt;/P&gt;&lt;P&gt;below is what I've tried&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;if(LIKP.Time_ERZET = ('14:00:00' , '00:07:59') , LIKP.CreatedOn_ERDAT = date(LIKP.CreatedOn_ERDAT -1)),&lt;/P&gt;&lt;P style="font-weight: bold"&gt;*the time field is formated in military time*&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;/B&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;/B&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; I've tried a few other variations as well&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;like using NOT etc. But I feel like my problem is this part ('14:00:00' , '00:07:59'). I make any date field associated with these time one day earlier.&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 16:07:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-date-for-a-certain-time-span/m-p/177015#M44788</guid>
      <dc:creator />
      <dc:date>2011-03-23T16:07:11Z</dc:date>
    </item>
    <item>
      <title>Changing date for a certain time span</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-date-for-a-certain-time-span/m-p/177016#M44789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your timestamp is formatted as a string, it's very difficult operating with it. I'd recommend casting it into a proper timestamp, using one of the "Interpretation functions" (search Help for this name) for example:&lt;/P&gt;&lt;P&gt;myTime = time#(Timestring, 'hh:mm:ss')&lt;/P&gt;&lt;P&gt;Once you convert your strings into proper time or timestamp fields, you can operate with them as with numbers:&lt;/P&gt;&lt;P&gt;1 day = 1&lt;/P&gt;&lt;P&gt;1 hour = 1/24&lt;/P&gt;&lt;P&gt;8:00 AM corresponds to 8/24 = 1/3&lt;/P&gt;&lt;P&gt;2:00 PM = 14:00, corresponds to 14/24 = 7/12&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 16:20:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-date-for-a-certain-time-span/m-p/177016#M44789</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2011-03-23T16:20:51Z</dc:date>
    </item>
    <item>
      <title>Changing date for a certain time span</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-date-for-a-certain-time-span/m-p/177017#M44790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Oleg,&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;P&gt;time#(timestring, 'hh:mm:ss') However, it did not convert the string to a number. It still returns times in the same format as before. Not sure if that's what you meant &lt;IMG alt="Tongue Tied" src="http://community.qlik.com/emoticons/emotion-7.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 16:47:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-date-for-a-certain-time-span/m-p/177017#M44790</guid>
      <dc:creator />
      <dc:date>2011-03-23T16:47:27Z</dc:date>
    </item>
  </channel>
</rss>

