<?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 Formatting in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1526585#M37844</link>
    <description>&lt;P&gt;I just confirmed the data is actually a date.&lt;/P&gt;&lt;P&gt;Isnum(MyDate) = -1&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Jan 2019 19:15:15 GMT</pubDate>
    <dc:creator>wdchristensen</dc:creator>
    <dc:date>2019-01-04T19:15:15Z</dc:date>
    <item>
      <title>Date Formatting</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1526582#M37843</link>
      <description>&lt;P&gt;When I add a date field to a filter pane in Qlik Sense it shows up in an&amp;nbsp;undesirable format (yyyy-mm-dd). My data is being pulled from date fields in SQL Server it formats the data in&amp;nbsp; format? It is almost like I am inadvertently converting the date to a string before it enters my application.&amp;nbsp; How can I get my filter to show the date as I intend to see it (m/d/yyyy) without converting it to a string?&amp;nbsp; Any help would be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DateFormatAnomaly.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/3090iA7DD08055D1C5A66/image-size/large?v=v2&amp;amp;px=999" role="button" title="DateFormatAnomaly.png" alt="DateFormatAnomaly.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 21:30:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1526582#M37843</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2021-12-21T21:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Date Formatting</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1526585#M37844</link>
      <description>&lt;P&gt;I just confirmed the data is actually a date.&lt;/P&gt;&lt;P&gt;Isnum(MyDate) = -1&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 19:15:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1526585#M37844</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2019-01-04T19:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Date Formatting</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1526594#M37847</link>
      <description>&lt;P&gt;Hey Buddy,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Qlik Sense is strange in the handling of dates and I have no idea why it does what it does. That being said, I suggest casting the dates on your load script even though they are already dates in SQL Server. This will allow you to use the dual function to view the desired string version of the date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date(MyDate, 'M/D/YYYY') as&amp;nbsp;MyDate&lt;/P&gt;&lt;P&gt;And if you have a time on that date you might think lets add the keyword "time" to the keyword "date" and make use of a "DateTime" function.&amp;nbsp;That kind of thinking leads to trouble, stop it immediately. Look for an altogether different term like timestamp and you just might be on to something. Happy coding!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/November2018/Subsystems/Hub/Content/Sense_Hub/Scripting/InterpretationFunctions/timestamp_hash.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/November2018/Subsystems/Hub/Content/Sense_Hub/Scripting/InterpretationFunctions/timestamp_hash.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 19:53:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1526594#M37847</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2019-01-04T19:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date Formatting</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1526633#M37850</link>
      <description>You need to set the DateFormat to match that returned by SQL Server to get it to recognize it as a date and store the dual value of the number and the string.&lt;BR /&gt;After load you can set the format back to M/D/YYYY to have it display that way.&lt;BR /&gt;Alternately for every date in load script replace just yourdatefield with this "conversion"&lt;BR /&gt;Date(Date#(yourdatefield,'YYYY-MM-DD'))</description>
      <pubDate>Sat, 05 Jan 2019 00:05:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1526633#M37850</guid>
      <dc:creator>dwforest</dc:creator>
      <dc:date>2019-01-05T00:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Date Formatting</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1527140#M37888</link>
      <description>&lt;P&gt;Thanks dvforest for the suggestion. I will give it a shot and let you know how it goes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The attached document seems to provide an explanation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sql.PNG" style="width: 540px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/3184iB2930FBB0BE5A8A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="sql.PNG" alt="sql.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2019 15:06:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1527140#M37888</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2019-01-07T15:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Date Formatting</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1527141#M37889</link>
      <description>&lt;P&gt;Tried to set date / datetime as follows&amp;nbsp;&lt;/P&gt;&lt;P&gt;// start of script&lt;/P&gt;&lt;P&gt;SET DateFormat='YYYY-M-D';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='YYYY-MM-DD h:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;//extract code&lt;/P&gt;&lt;P&gt;SET DateFormat='M/D/YYYY';&lt;BR /&gt;SET TimestampFormat='M/D/YYYY';&lt;/P&gt;&lt;P&gt;// works great for date time but not dates&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 15:17:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1527141#M37889</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2019-01-08T15:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Date Formatting</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1527142#M37890</link>
      <description>&lt;P&gt;I was able to get the date field to import correctly with the statement below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date(Date#(myDateField,'YYYY-MM-DD'), 'M/D/YYYY') as myDateField&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 15:38:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1527142#M37890</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2019-01-08T15:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date Formatting</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1527899#M37925</link>
      <description>&lt;P&gt;I would really prefer to use the&amp;nbsp;DateFormat and&amp;nbsp;TimestampFormat variables so I don't have to&amp;nbsp;touch each date field to get it in the correct format. I believe the setting the format once at the begining of the script to match SQL Server and once at the end to match my desired format is the best solution. Any idea why this approach only seems to work for &lt;STRONG&gt;datetime&lt;/STRONG&gt; fields and not basic &lt;STRONG&gt;date&lt;/STRONG&gt; fields? Any help would be greatly appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 15:56:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1527899#M37925</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2019-01-08T15:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Date Formatting</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1527935#M37927</link>
      <description>&lt;P&gt;Does it work if DateFormat&amp;nbsp;is 'YYYY-MM-DD' instead of 'YYYY-M-D' ?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 16:57:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1527935#M37927</guid>
      <dc:creator>dwforest</dc:creator>
      <dc:date>2019-01-08T16:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Date Formatting</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1527976#M37930</link>
      <description>&lt;P&gt;I tried that but it didn't work either....&amp;nbsp;&lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://community.qlik.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 17:43:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1527976#M37930</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2019-01-08T17:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Date Formatting</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1528063#M37936</link>
      <description>Are you trying to get the date part from a datetime field? date and timestamp are different in Qlik (and per your original post, if the date format and the timestamp format do not match the data it will make it a string).&lt;BR /&gt;To get the date from a timestamp, floor() the value. Dates/Timestamps in Qlik are dual value a number and string display. The number to the right of the decimal is time, so floor() essentially makes it midnight (00:00:00.000).&lt;BR /&gt;it is is still not working, example of your script and data is needed.</description>
      <pubDate>Tue, 08 Jan 2019 23:38:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1528063#M37936</guid>
      <dc:creator>dwforest</dc:creator>
      <dc:date>2019-01-08T23:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date Formatting</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1529211#M38057</link>
      <description>&lt;P&gt;Thanks &lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/50153" target="_self"&gt;dwforest &lt;/A&gt;for your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-App-Development/SET-DateFormat-YYYY-MM-DD-doesn-t-recognize-SQL-Server-dates/m-p/1529188/thread-id/38055/highlight/false#M38056" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Sense-App-Development/SET-DateFormat-YYYY-MM-DD-doesn-t-recognize-SQL-Server-dates/m-p/1529188/thread-id/38055/highlight/false#M38056&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DriverTypeSQL_Server.png" style="width: 557px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/3571i15DCD55D4828965E/image-size/large?v=v2&amp;amp;px=999" role="button" title="DriverTypeSQL_Server.png" alt="DriverTypeSQL_Server.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 22:27:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Formatting/m-p/1529211#M38057</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2019-01-10T22:27:41Z</dc:date>
    </item>
  </channel>
</rss>

