<?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: Salesforce.com Date Format in Script Date Variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Salesforce-com-Date-Format-in-Script-Date-Variable/m-p/851422#M658876</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your varaible vDate has value 2014-11-01 00:00:00.&amp;nbsp; I assume this is what you want.&amp;nbsp; And, I assume, you want to load the data after vDate.&amp;nbsp; That is, you need to convert format 2015-01-01T00:00:00.000Z to YYYY-MM-DD hh:mm:ss.&amp;nbsp; Can be done like this, for example:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;timestamp(timestamp#(purgechar(CreateDate,'TZ'), 'YYYY-MM-DDhh:mm:ss.fff'), 'YYYY-MM-DD hh:mm:ss') as CreateDate.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;After this you can use vDate to compare the new XCreate Date with it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Apr 2015 17:19:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-04-16T17:19:27Z</dc:date>
    <item>
      <title>Salesforce.com Date Format in Script Date Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Salesforce-com-Date-Format-in-Script-Date-Variable/m-p/851421#M658875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12pt;"&gt;I'm connecting to SFDC via the Qlikview API.&amp;nbsp; The format of the "Created Date" field in the EVENT object looks like this: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;2015-01-01T00:00:00.000Z&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12pt;"&gt;I'm trying to create a variable to use instead which pulls for the last 6 months.&amp;nbsp; I've tried the formula below, but it's not working...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff;"&gt;&lt;STRONG style="color: #0000ff;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Let&amp;nbsp; &lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;vDate &lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;= &lt;SPAN style="color: #0000ff;"&gt;TimeStamp&lt;/SPAN&gt;((&lt;SPAN style="color: #0000ff;"&gt;Floor&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(Today(),-5)) - &lt;SPAN style="color: #0000ff;"&gt;Floor&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Day&lt;/SPAN&gt;(Today()&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;))+1),'YYYY-MM-DD 00:00:00'); &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN style="color: #333333; font-size: 12pt;"&gt;When I run the script it just appears "frozen", instead of running the query.&amp;nbsp; Any thoughts?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN style="color: #333333; font-size: 12pt;"&gt;Thanks,&amp;nbsp; Dan&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 16:46:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Salesforce-com-Date-Format-in-Script-Date-Variable/m-p/851421#M658875</guid>
      <dc:creator />
      <dc:date>2015-04-16T16:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce.com Date Format in Script Date Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Salesforce-com-Date-Format-in-Script-Date-Variable/m-p/851422#M658876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your varaible vDate has value 2014-11-01 00:00:00.&amp;nbsp; I assume this is what you want.&amp;nbsp; And, I assume, you want to load the data after vDate.&amp;nbsp; That is, you need to convert format 2015-01-01T00:00:00.000Z to YYYY-MM-DD hh:mm:ss.&amp;nbsp; Can be done like this, for example:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;timestamp(timestamp#(purgechar(CreateDate,'TZ'), 'YYYY-MM-DDhh:mm:ss.fff'), 'YYYY-MM-DD hh:mm:ss') as CreateDate.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;After this you can use vDate to compare the new XCreate Date with it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 17:19:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Salesforce-com-Date-Format-in-Script-Date-Variable/m-p/851422#M658876</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-16T17:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce.com Date Format in Script Date Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Salesforce-com-Date-Format-in-Script-Date-Variable/m-p/851423#M658877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Michael for this conversion.It helped me:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2015 07:24:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Salesforce-com-Date-Format-in-Script-Date-Variable/m-p/851423#M658877</guid>
      <dc:creator />
      <dc:date>2015-04-21T07:24:45Z</dc:date>
    </item>
  </channel>
</rss>

