<?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: Formatting datefield which contains timestamp in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320905#M1192025</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks alot for your support!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 25 Jun 2011 13:04:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-25T13:04:17Z</dc:date>
    <item>
      <title>Formatting datefield which contains timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320902#M1192022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to load only the date from a field which contains date with time stamp. I tried the below code but it is not working as expected. Could you please help me out on this? I have attached the sample application with the qvd file where I am loading from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Login1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Date(Login,'DD/MM/YYYY') as Login&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;C:\Login1.qvd(qvd);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jun 2011 08:31:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320902#M1192022</guid>
      <dc:creator />
      <dc:date>2011-06-25T08:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting datefield which contains timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320903#M1192023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below code has done the trick. Is there is anyother alternative for this? If yes please do let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;date(floor(num(field)))&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jun 2011 09:18:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320903#M1192023</guid>
      <dc:creator />
      <dc:date>2011-06-25T09:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting datefield which contains timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320904#M1192024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can leave the date and floor functions, and that's the correct way to get the results you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Date(Floor(Login))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Floor() rounds the number found in Login down. That's needed because you have some timestamps with decimals, meaning not just a date, but a date with hours and minutes -a timestamp- (DD/MM/YYYY hh:mm). When QlikView interprets a numeric value with decimals as a date, you can make it represent only the DD/MM/YYYY but the subjacent value still has the hour:minute information. That's where the floor() function makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jun 2011 09:46:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320904#M1192024</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-25T09:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting datefield which contains timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320905#M1192025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks alot for your support!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jun 2011 13:04:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320905#M1192025</guid>
      <dc:creator />
      <dc:date>2011-06-25T13:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting datefield which contains timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320906#M1192026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the same thing in the application but it is still giving the date with the timestamp. Please let me know what could be the reason behind that. Your solution did worked previously in different application. Here what could be the reason for that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your information when I use Date(Floor(FieldName)) in the script it is not working but whereas when I used the same in the front end it works. May I know how can I do that in the backend please.&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;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2011 14:11:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320906#M1192026</guid>
      <dc:creator />
      <dc:date>2011-07-25T14:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting datefield which contains timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320907#M1192027</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;Make sure first that the field has a numeric format, and how it is being read (thousand or decimal separator may avoid Floor() to work).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; text-decoration: underline; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2011 16:47:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320907#M1192027</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-07-25T16:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting datefield which contains timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320908#M1192028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Attitude,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try out this method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 02:56:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320908#M1192028</guid>
      <dc:creator>deepakk</dc:creator>
      <dc:date>2011-07-26T02:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting datefield which contains timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320909#M1192029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is in numeric format only. It is showing like this 31/12/2006 00:00:00&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;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 04:38:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320909#M1192029</guid>
      <dc:creator />
      <dc:date>2011-07-26T04:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting datefield which contains timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320910#M1192030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Deepak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excellent code! Thanks... Hope that will solve my problem.&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;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 04:39:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320910#M1192030</guid>
      <dc:creator />
      <dc:date>2011-07-26T04:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting datefield which contains timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320911#M1192031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous solution which you gave was working fine only. I did the mistake by giving the alias name which is as same as the field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(Floor(FieldName)) AS FieldName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I did the change as below it worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(Floor(FieldName)) AS FieldName1&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;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 05:03:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320911#M1192031</guid>
      <dc:creator />
      <dc:date>2011-07-26T05:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting datefield which contains timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320912#M1192032</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;That sounds quite strange. If "FieldName" doesn't exist in your data model more than once, meaning is the only field in your model with that name, you can rename it as you like, and is very usual to rename a field with its own name after doing the required transformation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indeed, the following is working for me using your file as posted above, and it keeps only one date, getting ride of the decimal (time) part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;LOAD Date(Floor(Login)) AS Login&lt;/P&gt;&lt;P&gt;FROM Login1.qvd (qvd);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: It's possible that you are loading later that Login field in some other part of your script without formatting and that messes up the data. Check your file attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 07:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-datefield-which-contains-timestamp/m-p/320912#M1192032</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-07-26T07:07:00Z</dc:date>
    </item>
  </channel>
</rss>

