<?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 convert calendar date to julian using tmap. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-calendar-date-to-julian-using-tmap/m-p/2264127#M44077</link>
    <description>Will it going to work on the date format i have?&lt;BR /&gt;DD/MM/YY</description>
    <pubDate>Mon, 02 Feb 2015 15:24:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-02-02T15:24:02Z</dc:date>
    <item>
      <title>How to convert calendar date to julian using tmap.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-calendar-date-to-julian-using-tmap/m-p/2264125#M44075</link>
      <description>Hi,&lt;BR /&gt;Could you help with converting calendar date to Juilan using tmap processing.&lt;BR /&gt;I am reading data using tmssqlinput and going to insert data in JDE using AS400.&lt;BR /&gt;I attached a screenshot of source data and data, audo date need to be converted in to julian date.&lt;BR /&gt;Help would be appreciated.!&lt;BR /&gt;Thanks&lt;BR /&gt;Pranav</description>
      <pubDate>Mon, 02 Feb 2015 14:06:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-calendar-date-to-julian-using-tmap/m-p/2264125#M44075</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-02T14:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert calendar date to julian using tmap.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-calendar-date-to-julian-using-tmap/m-p/2264126#M44076</link>
      <description>I think that you can add some routine to have a function like DatetoJulian that you could use in tMap.&lt;BR /&gt;But you can do it using Java component :&lt;BR /&gt;&lt;A href="http://stackoverflow.com/questions/14535983/convert-a-regular-date-to-julian-date-and-vice-versa-in-java" target="_blank" rel="nofollow noopener noreferrer"&gt;http://stackoverflow.com/questions/14535983/convert-a-regular-date-to-julian-date-and-vice-versa-in-java&amp;nbsp;&lt;/A&gt;</description>
      <pubDate>Mon, 02 Feb 2015 14:15:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-calendar-date-to-julian-using-tmap/m-p/2264126#M44076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-02T14:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert calendar date to julian using tmap.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-calendar-date-to-julian-using-tmap/m-p/2264127#M44077</link>
      <description>Will it going to work on the date format i have?&lt;BR /&gt;DD/MM/YY</description>
      <pubDate>Mon, 02 Feb 2015 15:24:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-calendar-date-to-julian-using-tmap/m-p/2264127#M44077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-02T15:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert calendar date to julian using tmap.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-calendar-date-to-julian-using-tmap/m-p/2264128#M44078</link>
      <description>If I look at the code of the link,&amp;nbsp;
&lt;BR /&gt;I can see :&amp;nbsp;
&lt;BR /&gt;dayS = unformattedDate.substring(0,2);
&lt;BR /&gt;monthS = unformattedDate.substring(3, 5);
&lt;BR /&gt;yearS = unformattedDate.substring(6, 10);
&lt;BR /&gt;So actually, the format date is DD/MM/YYYY
&lt;BR /&gt;You can try with your format, but I think it'll need to be DD/MM/YYYY format.
&lt;BR /&gt;You should convert it.</description>
      <pubDate>Mon, 02 Feb 2015 15:35:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-calendar-date-to-julian-using-tmap/m-p/2264128#M44078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-02T15:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert calendar date to julian using tmap.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-calendar-date-to-julian-using-tmap/m-p/2264129#M44079</link>
      <description>Hi,&amp;nbsp;&lt;BR /&gt;I found one code in our Routine and when i used in a job, i got following error.&lt;BR /&gt;Exception in component tMSSqlInput_1&lt;BR /&gt;java.lang.StringIndexOutOfBoundsException: String index out of range: -1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.String.substring(Unknown Source)&lt;BR /&gt;Code&lt;BR /&gt;public static String getJDEJulianDate(String CalendarDate_MMddyyyy)&lt;BR /&gt;	&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;		String strYYY = "";&lt;BR /&gt;		int intdays = 0;&lt;BR /&gt;		String strJulianDate = "";&lt;BR /&gt;		&lt;BR /&gt;		try {&lt;BR /&gt;			&lt;BR /&gt;		SimpleDateFormat sdf = new SimpleDateFormat("MMddyyyy");&lt;BR /&gt;		Calendar calDate = Calendar.getInstance();&lt;BR /&gt;		calDate.setTime(sdf.parse(CalendarDate_MMddyyyy));&lt;BR /&gt;		if (calDate.get(Calendar.YEAR) &amp;gt; 1999)&lt;BR /&gt;			{&lt;BR /&gt;			strYYY = "1" + Integer.toString(calDate.get(Calendar.YEAR)).substring(2);&lt;BR /&gt;			}&lt;BR /&gt;		else&lt;BR /&gt;			{&lt;BR /&gt;			strYYY = Integer.toString(calDate.get(Calendar.YEAR)).substring(2);&lt;BR /&gt;			}&lt;BR /&gt;		intdays = calDate.get(Calendar.DAY_OF_YEAR);&lt;BR /&gt;		if (intdays &amp;lt; 100)&lt;BR /&gt;			{&lt;BR /&gt;			strJulianDate = strYYY + "0" + Integer.toString(intdays);&lt;BR /&gt;			}&lt;BR /&gt;		else&lt;BR /&gt;			{&lt;BR /&gt;			strJulianDate = strYYY + Integer.toString(intdays);&lt;BR /&gt;			}&lt;BR /&gt;		} catch (ParseException e) {&lt;BR /&gt;			// TODO Auto-generated catch block&lt;BR /&gt;			e.printStackTrace();&lt;BR /&gt;		}&lt;BR /&gt;			&lt;BR /&gt;	return strJulianDate;&lt;BR /&gt;	}&lt;BR /&gt;Thanks&lt;BR /&gt;Pranav</description>
      <pubDate>Tue, 03 Feb 2015 17:38:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-calendar-date-to-julian-using-tmap/m-p/2264129#M44079</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-03T17:38:33Z</dc:date>
    </item>
  </channel>
</rss>

