<?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: Date ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date/m-p/898167#M1015908</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Change your date format like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Date((CLM_CR_DT),'DD/MM/YYYY hh:mm:ss')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Apr 2015 09:16:22 GMT</pubDate>
    <dc:creator>krishna20</dc:creator>
    <dc:date>2015-04-12T09:16:22Z</dc:date>
    <item>
      <title>Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898166#M1015907</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 date and time combined field in my SQL db. they have used Longtodate function extract the date in DB. how to get the exact date in QLikview??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg : My Date filed shows the value "1419310077901".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 08:35:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898166#M1015907</guid>
      <dc:creator />
      <dc:date>2015-04-12T08:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898167#M1015908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Change your date format like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Date((CLM_CR_DT),'DD/MM/YYYY hh:mm:ss')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 09:16:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898167#M1015908</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2015-04-12T09:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898168#M1015909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For any kind of date problems it is recommended to use the below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(Date#(Date,'YYYYMMDD')) as Date,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date# converts text to number and Date converts number to text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 10:23:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898168#M1015909</guid>
      <dc:creator>satishkurra</dc:creator>
      <dc:date>2015-04-12T10:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898169#M1015910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain what exactly date and time is represented by value '1419310077901'?&lt;/P&gt;&lt;P&gt;Most likely you need the &lt;STRONG&gt;timestamp#()&lt;/STRONG&gt; function, but I can't guess the format...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 11:31:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898169#M1015910</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-12T11:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898170#M1015911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Hi try like this &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em; background-color: #f5faf0;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em; background-color: #f5faf0;"&gt;Date(Date#(DateField, 'YYYYMMDD'), 'M/D/YY')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f5faf0;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f5faf0;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f5faf0;"&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2622"&gt;Get the Dates Right&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f5faf0;"&gt;Hope this will help you&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f5faf0;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 11:45:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898170#M1015911</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-12T11:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898171#M1015912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;even I am nt able to guess the format.when I extract the table from DB.it gives me the date in this format. and they are using LONGTODATE function inorder to extract the date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 12:20:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898171#M1015912</guid>
      <dc:creator />
      <dc:date>2015-04-12T12:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898172#M1015913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From what I read about longtodate - it is the number of milliseconds from the "beginning of time" (1970).&amp;nbsp; If this is the case, this should work:&lt;/P&gt;&lt;P&gt;=timestamp(addyears(timestamp(YourDateField/86400000),70))&lt;/P&gt;&lt;P&gt;Where 86400000 is the number of milliseconds in one day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 12:57:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898172#M1015913</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-12T12:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898173#M1015914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Have you tried this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Date((your_Date_Fild),'DD/MM/YYYY hh:mm:ss')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 13:03:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898173#M1015914</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2015-04-12T13:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898174#M1015915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi... I gt the date as I required.&lt;/P&gt;&lt;P&gt;Can yu please explain wat we are doing here exactly.??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Reena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 13:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898174#M1015915</guid>
      <dc:creator />
      <dc:date>2015-04-12T13:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898175#M1015916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice Work Micheal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 13:50:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898175#M1015916</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-12T13:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898176#M1015917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure.&lt;/P&gt;&lt;P&gt;The first step is to divide the data by 86400000 - that is to covert the number of milliseconds into the days.&amp;nbsp; The number is from this:&lt;/P&gt;&lt;P&gt;1000 ms * 60 s * 60 min * 24 hours&lt;/P&gt;&lt;P&gt;If you want make it clearer in the script, instead of&lt;/P&gt;&lt;P&gt;YourDateField/&lt;STRONG&gt;86400000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;you can write same thing in a different way&lt;/P&gt;&lt;P&gt;YourDateField/&lt;STRONG&gt;24/60/60/1000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next step is to convert it in date-time by using timestamp() function&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;timestamp(&lt;/STRONG&gt;YourDateField/86400000&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But we're not there yet, because for QlikView (and Excel) time starts in 1900, not in 1970.&amp;nbsp; Need to move 70 years forward:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;addyears(&lt;/STRONG&gt;timestamp(YourDateField/86400000)&lt;STRONG&gt;,70)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returns what you need, but in my testing it showed only date without time.&amp;nbsp; To get date and time, I added one more timestamp():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;timestamp(&lt;/STRONG&gt;addyears(timestamp(YourDateField/86400000),70)&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 16:22:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898176#M1015917</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-12T16:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898177#M1015918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ohh...great.. .!!&amp;nbsp; Thanks a ton Micheal.. itz a great work... !!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 07:44:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898177#M1015918</guid>
      <dc:creator />
      <dc:date>2015-04-13T07:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898178#M1015919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii..&lt;/P&gt;&lt;P&gt;Micheal...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;am a able to achieve the date bt the date is not correct as I required.&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;for the db date = "1422776437800" it is giving&amp;nbsp; me the value "1/30/2015 7:40:37 AM"&amp;nbsp; which is not correct, actual date should be " Feb 1, 2015 11:40 AM".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think we have to make some changes in expression used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Reena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 08:18:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898178#M1015919</guid>
      <dc:creator />
      <dc:date>2015-04-14T08:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898179#M1015920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a time difference of 2 days and 4 hours is there in all the time conversion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 08:30:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898179#M1015920</guid>
      <dc:creator />
      <dc:date>2015-04-14T08:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898180#M1015921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You see, you do know what result to expect after all &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;P&gt;OK, I can't tell what is the reason, maybe I didn't find some nuance of the longdate function rule - but &lt;STRONG&gt;if the difference is consistent,&lt;/STRONG&gt; it is easy to fix.&amp;nbsp; Just add this difference to the expression.&amp;nbsp; If it is exactly 52 hours (two days and four hours), the correction will be&lt;/P&gt;&lt;P&gt;52/24:&lt;/P&gt;&lt;P&gt;=timestamp(addyears(timestamp(YourDateField/86400000),70) &lt;STRONG&gt;+ 52/24&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you find out about the rules, let us know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 12:38:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898180#M1015921</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-14T12:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date ?</title>
      <link>https://community.qlik.com/t5/QlikView/Date/m-p/898181#M1015922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi...&lt;/P&gt;&lt;P&gt;Yeah...I have done the same... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&amp;nbsp; bt don't know y it ws showin that difference. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 13:23:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date/m-p/898181#M1015922</guid>
      <dc:creator />
      <dc:date>2015-04-14T13:23:47Z</dc:date>
    </item>
  </channel>
</rss>

