<?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: Newbie question: Split a date-time field into date while preserving the format in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Newbie-question-Split-a-date-time-field-into-date-while/m-p/432506#M1152261</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;floor(MyTimestamp) will remove the time part of a timestamp (aka datetime), leaving only the date part&lt;/P&gt;&lt;P&gt;frac(MyTimestamp) will remove the date part of a timestamp, leaving only the time part&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the timestamp field isn't a numeric field, but a string you can use string manipulation functions. For example &lt;/P&gt;&lt;P&gt;date#(subfield(MyDateString,' ',1),'dd.MM.yyyy') as MyDate&lt;/P&gt;&lt;P&gt;date#(subfield(MyDateString,' ',2),'hh:mm:ss') as MyTime&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace MyTimestamp and/or MyDateString with your fieldname and make sure you use capital MM's to specify months and use mm for minutes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Apr 2013 17:09:06 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-04-09T17:09:06Z</dc:date>
    <item>
      <title>Newbie question: Split a date-time field into date while preserving the format</title>
      <link>https://community.qlik.com/t5/QlikView/Newbie-question-Split-a-date-time-field-into-date-while/m-p/432505#M1152260</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 a field containing a date and time in the format &amp;gt;dd.mm.yyyy hh:mm:ss&amp;lt;. What I want to do is split out only the date for selection purposes while preserving the DATE format - I want to add a day-month-quarter mapping to the diagram and possibly link the table where that field is to others containing a date - that is why I absolutely have to keep it as a DATE field, not as a STRING - as such, I know how I could do it...&lt;/P&gt;&lt;P&gt;Can anybody advise me on this, please?&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 14:35:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Newbie-question-Split-a-date-time-field-into-date-while/m-p/432505#M1152260</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-04-08T14:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie question: Split a date-time field into date while preserving the format</title>
      <link>https://community.qlik.com/t5/QlikView/Newbie-question-Split-a-date-time-field-into-date-while/m-p/432506#M1152261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;floor(MyTimestamp) will remove the time part of a timestamp (aka datetime), leaving only the date part&lt;/P&gt;&lt;P&gt;frac(MyTimestamp) will remove the date part of a timestamp, leaving only the time part&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the timestamp field isn't a numeric field, but a string you can use string manipulation functions. For example &lt;/P&gt;&lt;P&gt;date#(subfield(MyDateString,' ',1),'dd.MM.yyyy') as MyDate&lt;/P&gt;&lt;P&gt;date#(subfield(MyDateString,' ',2),'hh:mm:ss') as MyTime&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace MyTimestamp and/or MyDateString with your fieldname and make sure you use capital MM's to specify months and use mm for minutes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 17:09:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Newbie-question-Split-a-date-time-field-into-date-while/m-p/432506#M1152261</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-04-09T17:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie question: Split a date-time field into date while preserving the format</title>
      <link>https://community.qlik.com/t5/QlikView/Newbie-question-Split-a-date-time-field-into-date-while/m-p/432507#M1152262</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;in principle, that works - that was the first thing I tried, actually, but I thought I was doing something wrong: Now I do get a date in proper format dd.mm.yyyy - but I also get some number, I don't know what that is.&lt;/P&gt;&lt;P&gt;I cannot use that as a dimension in my diagram because for some reason, there only that number is displayed (when using the same command), no date.&lt;/P&gt;&lt;P&gt;Also, when I look at the table preview, the date-time-stamp looks very weird - it is stored there as a decimal value. Is that correct?&lt;/P&gt;&lt;P&gt;We have a multi-tier architecture here: There is one qvw loading data from the database once in the morning and stores it all in QVD files. My document uses those QVD files. Maybe I have to change the script loading the data in the first place?&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: It is even worse - I just realized I had an inconsistency: In the object_properties dialog, there are two places where one can put a formula and I had two different ones - one was a LEFT, splitting out the date all right, but changing it into a STRING. The other was the FLOOR command. I deleted my own LEFT function to test the result of the FLOOR command - now I have no date whatsoever, but only a number. That must be because of the format of the base data...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 08:28:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Newbie-question-Split-a-date-time-field-into-date-while/m-p/432507#M1152262</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-04-10T08:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie question: Split a date-time field into date while preserving the format</title>
      <link>https://community.qlik.com/t5/QlikView/Newbie-question-Split-a-date-time-field-into-date-while/m-p/432508#M1152263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;now I have no date whatsoever, but only a number. That must be because of the format of the base data...&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very likely. You can add a format in the script with the date() function: date(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;floor(MyTimestamp),'DD.MM.YYYY'). Or you can set the formatting on the Number tab of the properties screen of the object where you use the field.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 16:58:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Newbie-question-Split-a-date-time-field-into-date-while/m-p/432508#M1152263</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-04-10T16:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie question: Split a date-time field into date while preserving the format</title>
      <link>https://community.qlik.com/t5/QlikView/Newbie-question-Split-a-date-time-field-into-date-while/m-p/432509#M1152264</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;thanks for the answer! - While this was in the moderating process, I have found the solution: I read up daily and I learnt that the datetime stamp is internally saved as a numeric value and that the FLOOR function simply rounds it down, so it is the correct function of course. I just have to make sure it is displayed as a date, either by the DATE function or in the properties of the diagram. I'm happy to notice that, though giving me the correct solution, you are not now telling me anything I have not thought of since yesterday. &lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 07:03:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Newbie-question-Split-a-date-time-field-into-date-while/m-p/432509#M1152264</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-04-11T07:03:13Z</dc:date>
    </item>
  </channel>
</rss>

