<?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: [resolved] Retrieve last months name from a variable i.e. May in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Retrieve-last-months-name-from-a-variable-i-e-May/m-p/2298109#M70614</link>
    <description>You solution is a bit cumbersome. 
&lt;BR /&gt;This expression will give you the name of the previous month (just today it return May) 
&lt;BR /&gt; 
&lt;PRE&gt;TalendDate.formatDate("MMM", TalendDate.addDate(TalendDate.getCurrentDate(), -1, "MM"))&lt;/PRE&gt;</description>
    <pubDate>Mon, 16 Jun 2014 20:17:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-06-16T20:17:28Z</dc:date>
    <item>
      <title>[resolved] Retrieve last months name from a variable i.e. May</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Retrieve-last-months-name-from-a-variable-i-e-May/m-p/2298108#M70613</link>
      <description>I am using tSetGlobalVar to create variables for use in the subject line of a tSendMail component. I would like to show that month name in the subject line i.e. TalendDate.getDate("MMMM") June. However I would like to show the prior month i.e. May. Talend obviously knows the months. I can retrieve the prior month using the following: 
&lt;BR /&gt;TalendDate.addDate(TalendDate.getDate("MM/dd/yyyy") , "MM/dd/yyyy", -1,"MM") 
&lt;BR /&gt;TalendDate.getPartOfDate("MONTH",TalendDate.parseDate("yyyy-MM-dd", ((String)globalMap.get("dateStamp")))) 
&lt;BR /&gt;The problem being that this was a manual process that is now being automated and the request is to have the subject line of the email contain last months name rather than 5/2014. 
&lt;BR /&gt;I am using Talend Enterprise Data Integration Cluster edition 5.0.2.r78327 
&lt;BR /&gt;We plan to upgrade to 5.3 in the next quarter. 
&lt;BR /&gt;Thanks in advance</description>
      <pubDate>Mon, 16 Jun 2014 15:41:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Retrieve-last-months-name-from-a-variable-i-e-May/m-p/2298108#M70613</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-16T15:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Retrieve last months name from a variable i.e. May</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Retrieve-last-months-name-from-a-variable-i-e-May/m-p/2298109#M70614</link>
      <description>You solution is a bit cumbersome. 
&lt;BR /&gt;This expression will give you the name of the previous month (just today it return May) 
&lt;BR /&gt; 
&lt;PRE&gt;TalendDate.formatDate("MMM", TalendDate.addDate(TalendDate.getCurrentDate(), -1, "MM"))&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jun 2014 20:17:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Retrieve-last-months-name-from-a-variable-i-e-May/m-p/2298109#M70614</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-16T20:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Retrieve last months name from a variable i.e. May</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Retrieve-last-months-name-from-a-variable-i-e-May/m-p/2298110#M70615</link>
      <description>Thank you for your help. Your answer has expanded my understanding of the formatDate and addDate functions.</description>
      <pubDate>Mon, 16 Jun 2014 20:43:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Retrieve-last-months-name-from-a-variable-i-e-May/m-p/2298110#M70615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-16T20:43:34Z</dc:date>
    </item>
  </channel>
</rss>

