<?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: How to get the previous date in tMap? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-the-previous-date-in-tMap/m-p/2333880#M102618</link>
    <description>&lt;P&gt;I got the answer,if anyone else is wondering how to do it.&lt;/P&gt;&lt;P&gt;If you have Java 8 &amp;amp;above you can use this routine&lt;/P&gt;&lt;P&gt;Input Date Format should be 'YYYY-MM-dd'&lt;/P&gt;&lt;P&gt;and date column should be passed as a string,you would also get the output as a string&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;package routines;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;import java.time.*;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&amp;nbsp;* user specification: the function's comment should contain keys as follows: 1. write about the function's comment.but&lt;/P&gt;&lt;P&gt;&amp;nbsp;* it must be before the "{talendTypes}" key.&lt;/P&gt;&lt;P&gt;&amp;nbsp;*&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;* 2. {talendTypes} 's value must be talend Type, it is required . its value should be one of: String, char | Character,&lt;/P&gt;&lt;P&gt;&amp;nbsp;* long | Long, int | Integer, boolean | Boolean, byte | Byte, Date, double | Double, float | Float, Object, short |&lt;/P&gt;&lt;P&gt;&amp;nbsp;* Short&lt;/P&gt;&lt;P&gt;&amp;nbsp;*&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;* 3. {Category} define a category for the Function. it is required. its value is user-defined .&lt;/P&gt;&lt;P&gt;&amp;nbsp;*&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;* 4. {param} 's format is: {param} &amp;lt;type&amp;gt;[(&amp;lt;default value or closed list values&amp;gt;)] &amp;lt;name&amp;gt;[ : &amp;lt;comment&amp;gt;]&lt;/P&gt;&lt;P&gt;&amp;nbsp;*&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;* &amp;lt;type&amp;gt; 's value should be one of: string, int, list, double, object, boolean, long, char, date. &amp;lt;name&amp;gt;'s value is the&lt;/P&gt;&lt;P&gt;&amp;nbsp;* Function's parameter name. the {param} is optional. so if you the Function without the parameters. the {param} don't&lt;/P&gt;&lt;P&gt;&amp;nbsp;* added. you can have many parameters for the Function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;*&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;* 5. {example} gives a example for the Function. it is optional.&lt;/P&gt;&lt;P&gt;&amp;nbsp;*/&lt;/P&gt;&lt;P&gt;&lt;B&gt;public class PreviousDate {&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 /**&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 * helloExample: not return value, only print "hello" + message.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 *&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 *&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 * {talendTypes} String&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 *&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 * {Category} User Defined&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 *&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 * {param} string("world") input: The string need to be printed.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 *&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 * {example} helloExemple("world") # hello world !.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 */&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;public static String GetSundayDate(String date) {&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	 LocalDate date1 = LocalDate.parse(date) ;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LocalDate returnvalue = date1.minusDays(1);&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String r=(returnvalue.toString());&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return r;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;		}&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;}&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Mar 2021 05:49:01 GMT</pubDate>
    <dc:creator>Ray0801</dc:creator>
    <dc:date>2021-03-27T05:49:01Z</dc:date>
    <item>
      <title>How to get the previous date in tMap?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-the-previous-date-in-tMap/m-p/2333879#M102617</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a date column in the format "DDMMMYYYY" I need to get the previous date,there is no specific function available in the tMap for subtracting a no of days  from a date?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 17:02:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-the-previous-date-in-tMap/m-p/2333879#M102617</guid>
      <dc:creator>Ray0801</dc:creator>
      <dc:date>2021-03-26T17:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the previous date in tMap?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-the-previous-date-in-tMap/m-p/2333880#M102618</link>
      <description>&lt;P&gt;I got the answer,if anyone else is wondering how to do it.&lt;/P&gt;&lt;P&gt;If you have Java 8 &amp;amp;above you can use this routine&lt;/P&gt;&lt;P&gt;Input Date Format should be 'YYYY-MM-dd'&lt;/P&gt;&lt;P&gt;and date column should be passed as a string,you would also get the output as a string&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;package routines;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;import java.time.*;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&amp;nbsp;* user specification: the function's comment should contain keys as follows: 1. write about the function's comment.but&lt;/P&gt;&lt;P&gt;&amp;nbsp;* it must be before the "{talendTypes}" key.&lt;/P&gt;&lt;P&gt;&amp;nbsp;*&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;* 2. {talendTypes} 's value must be talend Type, it is required . its value should be one of: String, char | Character,&lt;/P&gt;&lt;P&gt;&amp;nbsp;* long | Long, int | Integer, boolean | Boolean, byte | Byte, Date, double | Double, float | Float, Object, short |&lt;/P&gt;&lt;P&gt;&amp;nbsp;* Short&lt;/P&gt;&lt;P&gt;&amp;nbsp;*&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;* 3. {Category} define a category for the Function. it is required. its value is user-defined .&lt;/P&gt;&lt;P&gt;&amp;nbsp;*&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;* 4. {param} 's format is: {param} &amp;lt;type&amp;gt;[(&amp;lt;default value or closed list values&amp;gt;)] &amp;lt;name&amp;gt;[ : &amp;lt;comment&amp;gt;]&lt;/P&gt;&lt;P&gt;&amp;nbsp;*&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;* &amp;lt;type&amp;gt; 's value should be one of: string, int, list, double, object, boolean, long, char, date. &amp;lt;name&amp;gt;'s value is the&lt;/P&gt;&lt;P&gt;&amp;nbsp;* Function's parameter name. the {param} is optional. so if you the Function without the parameters. the {param} don't&lt;/P&gt;&lt;P&gt;&amp;nbsp;* added. you can have many parameters for the Function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;*&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;* 5. {example} gives a example for the Function. it is optional.&lt;/P&gt;&lt;P&gt;&amp;nbsp;*/&lt;/P&gt;&lt;P&gt;&lt;B&gt;public class PreviousDate {&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 /**&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 * helloExample: not return value, only print "hello" + message.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 *&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 *&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 * {talendTypes} String&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 *&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 * {Category} User Defined&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 *&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 * {param} string("world") input: The string need to be printed.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 *&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 * {example} helloExemple("world") # hello world !.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	 */&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;	&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;public static String GetSundayDate(String date) {&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	 LocalDate date1 = LocalDate.parse(date) ;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LocalDate returnvalue = date1.minusDays(1);&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String r=(returnvalue.toString());&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return r;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;	&amp;nbsp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;		}&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;}&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Mar 2021 05:49:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-the-previous-date-in-tMap/m-p/2333880#M102618</guid>
      <dc:creator>Ray0801</dc:creator>
      <dc:date>2021-03-27T05:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the previous date in tMap?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-the-previous-date-in-tMap/m-p/2333881#M102619</link>
      <description>&lt;P&gt;There is a built-in function TalendDate.addDate(), you can find more information about this function in Repository--&amp;gt;Code--Routine&amp;gt;System--&amp;gt;TalendDate, try it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 07:29:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-the-previous-date-in-tMap/m-p/2333881#M102619</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-29T07:29:40Z</dc:date>
    </item>
  </channel>
</rss>

