<?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 convert time in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260526#M41634</link>
    <description>Hi 
&lt;BR /&gt;I am having time of the date in the format 0.39886574074074 which actually is represent of the 9:34:22 time . 
&lt;BR /&gt;Does anyone know how I can convert number 0.39886574074074 to be this time format using talend . 
&lt;BR /&gt;Thanks
&lt;BR /&gt;Zeljka</description>
    <pubDate>Sat, 16 Nov 2024 12:53:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T12:53:17Z</dc:date>
    <item>
      <title>convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260526#M41634</link>
      <description>Hi 
&lt;BR /&gt;I am having time of the date in the format 0.39886574074074 which actually is represent of the 9:34:22 time . 
&lt;BR /&gt;Does anyone know how I can convert number 0.39886574074074 to be this time format using talend . 
&lt;BR /&gt;Thanks
&lt;BR /&gt;Zeljka</description>
      <pubDate>Sat, 16 Nov 2024 12:53:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260526#M41634</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260527#M41635</link>
      <description>I think you can use Java routine. Make your own function to convert your format.&lt;BR /&gt;Benoît</description>
      <pubDate>Mon, 06 Jun 2011 14:09:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260527#M41635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-06T14:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260528#M41636</link>
      <description>As I am not really Java developer could you please give me some sugestion... &lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 06 Jun 2011 14:14:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260528#M41636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-06T14:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260529#M41637</link>
      <description>I can try to help you but, can you explain me first how to convert the format.&lt;BR /&gt;I didn't understand how you pass from 0.39886574074074 to 9:34:22.&lt;BR /&gt;Benoit.</description>
      <pubDate>Mon, 06 Jun 2011 14:32:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260529#M41637</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-06T14:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260530#M41638</link>
      <description>I am having this format in csv file which data I am mapping. &lt;BR /&gt;The format of time is what I stated 0.398865741 as cell was formated as general . &lt;BR /&gt;However, I know is easy if I just reformat cell to be Time but I am not aloud to change any date and I need to upload date in format as it is and just after in Talend can do any changed...&lt;BR /&gt;I have look how to do this using some talend components but wasnt' much luck that is reason why I asked for help...&lt;BR /&gt;thanks</description>
      <pubDate>Mon, 06 Jun 2011 16:09:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260530#M41638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-06T16:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260531#M41639</link>
      <description>I still didn't understand what means your number 0.398865741 ?
&lt;BR /&gt;My question was how you can conclude the number 0.39886574074074 is the folowing time 9:34:22 ?
&lt;BR /&gt; ?
&lt;BR /&gt;0.39886574074074 -&amp;gt; 9:34:22
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Benoît.</description>
      <pubDate>Mon, 06 Jun 2011 16:48:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260531#M41639</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-06T16:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260532#M41640</link>
      <description>This number was in my csv document which I have opend using excel. 
&lt;BR /&gt;When you check format cell for that number is showing you General option but when I chose Time option giving me time which I actually need but can not change in excel have to be changed in Talend when I created file delemeted and do mapping. 
&lt;BR /&gt;Please see images</description>
      <pubDate>Mon, 06 Jun 2011 17:09:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260532#M41640</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-06T17:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260533#M41641</link>
      <description>Sounds like your not sure what excel is doing to your data. If you can avoid sourcing data from excel, its ALWAYS a good idea to do so. 
&lt;BR /&gt;That said, if you're stuck reading excel files (I am so so sorry) -- here's the skinny 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Excel stores dates as sequential numbers known as serial values. Excel stores times as decimal fractions because time is considered a portion of a day. Dates and times are values and so you can add, subtract, and include dates and times in other calculations. &lt;BR /&gt;For example, to determine the difference between two dates, you can subtract one date from the other. You can view a date as a serial value and a time as a decimal fraction by changing the format of the cell that contains the date or time to General format.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;so its just fractional days... I can write a converter for that 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;This is in Perl cause I had it handy... if you're still stuck, I can convert to java for you 
&lt;BR /&gt; 
&lt;PRE&gt;#!/usr/bin/perl -w&lt;BR /&gt;use strict;&lt;BR /&gt;&lt;BR /&gt;my $excel_time = 0.398865741; #9:34:22&lt;BR /&gt;my $sec_in_day = 86400;&lt;BR /&gt;my $min_in_day = 1440;&lt;BR /&gt;my $hour_in_day = 24;&lt;BR /&gt;#int function just truncates decimals&lt;BR /&gt;my $h = int($excel_time * $hour_in_day); #hours are easy&lt;BR /&gt;my $m = int(($excel_time * $min_in_day) - $h * 60); #minuets, minus the hour portion&lt;BR /&gt;my $s = int(($excel_time * $sec_in_day) - (($h * 60 * 60) + $m * 60)); #seconds minus the hours and min portion&lt;BR /&gt;&lt;BR /&gt;print "$excel_time --&amp;gt; $h:$m:$s \n";&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Jun 2011 19:16:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260533#M41641</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-06T19:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260534#M41642</link>
      <description>thanks for this perl but I am using java .. &lt;BR /&gt;do you mind to give me some java exampe. ..</description>
      <pubDate>Tue, 07 Jun 2011 08:52:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260534#M41642</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-07T08:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260535#M41643</link>
      <description>I do know what excel doing to my date but the problme as our client sending us files in that fomat and we are not aloud to change any orginal document just to use and do ETL data for our use and convert by talend but not touching any orginal document.. 
&lt;BR /&gt;I am not java developer I am more Database person and now I am stuck with this java code, had tried to find some solution but did not have much luck.. 
&lt;BR /&gt;will be great if you can help .. 
&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 07 Jun 2011 09:11:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260535#M41643</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-07T09:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260536#M41644</link>
      <description>This is a copy in Java of JohnGarrettMartin code : 
&lt;BR /&gt; public static String myFunction(double excelTime) 
&lt;BR /&gt; { 
&lt;BR /&gt; int secInDay = 86400; 
&lt;BR /&gt; int minInDay = 1440; 
&lt;BR /&gt; int hourInDay = 24; 
&lt;BR /&gt; 
&lt;BR /&gt; int myHour = new Double(excelTime * hourInDay).intValue(); 
&lt;BR /&gt; int myMin = new Double((excelTime * minInDay) - (myHour * 60)).intValue(); 
&lt;BR /&gt; int mySec = new Double((excelTime * secInDay) - ((myHour * 3600) + (myMin * 60))).intValue(); 
&lt;BR /&gt; 
&lt;BR /&gt; return myHour + ":" + myMin + ":" + mySec; 
&lt;BR /&gt; }</description>
      <pubDate>Tue, 07 Jun 2011 09:11:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260536#M41644</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-07T09:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260537#M41645</link>
      <description>You can put these function in a routine class, and next call it from your Talend job.</description>
      <pubDate>Tue, 07 Jun 2011 09:14:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260537#M41645</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-07T09:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260538#M41646</link>
      <description>Thanks</description>
      <pubDate>Tue, 07 Jun 2011 09:43:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260538#M41646</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-07T09:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260539#M41647</link>
      <description>Hi, &lt;BR /&gt;This routine word as I expected but the only problem I am getting the time as 10:9:18 .. Is any way I can get everywhere as two digits 10:09:18 or 09:10:18&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 07 Jun 2011 12:14:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260539#M41647</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-07T12:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260540#M41648</link>
      <description>Maybe if you try these code 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; : 
&lt;BR /&gt;public static String myFunction(double excelTime) 
&lt;BR /&gt; { 
&lt;BR /&gt; int secInDay = 86400; 
&lt;BR /&gt; int minInDay = 1440; 
&lt;BR /&gt; int hourInDay = 24; 
&lt;BR /&gt; 
&lt;BR /&gt; String myHour = Integer.toString(new Double(excelTime * hourInDay).intValue()); 
&lt;BR /&gt; if(myHour.length() == 1) 
&lt;BR /&gt; { 
&lt;BR /&gt; myHour = "0" + myHour; 
&lt;BR /&gt; } 
&lt;BR /&gt; 
&lt;BR /&gt; String myMin = Integer.toString(new Double((excelTime * minInDay) - (myHour * 60)).intValue()); 
&lt;BR /&gt; if(myMin.length() == 1) 
&lt;BR /&gt; { 
&lt;BR /&gt; myMin = "0" + myMin; 
&lt;BR /&gt; } 
&lt;BR /&gt; 
&lt;BR /&gt; String mySec = Integer.toString(new Double((excelTime * secInDay) - ((myHour * 3600) + (myMin * 60))).intValue()); 
&lt;BR /&gt; if(mySec.length() == 1) 
&lt;BR /&gt; { 
&lt;BR /&gt; mySec = "0" + mySec; 
&lt;BR /&gt; } 
&lt;BR /&gt; 
&lt;BR /&gt; return myHour + ":" + myMin + ":" + mySec; 
&lt;BR /&gt; } 
&lt;BR /&gt; 
&lt;BR /&gt;Benoît.</description>
      <pubDate>Tue, 07 Jun 2011 13:10:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260540#M41648</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-07T13:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260541#M41649</link>
      <description>Thanks ... &lt;BR /&gt;I have also try this one and it's working ... &lt;BR /&gt;package routines;&lt;BR /&gt;public class DateTime {&lt;BR /&gt;    public static String myFunction(double InputTime)&lt;BR /&gt;    {&lt;BR /&gt;        int secInDay = 86400;&lt;BR /&gt;        int minInDay = 1440;&lt;BR /&gt;        int hourInDay = 24;&lt;BR /&gt;        String myHourStringRep = "";&lt;BR /&gt;        String myMinInDayStringRep = "";&lt;BR /&gt;        String secInDayStringRep = "";&lt;BR /&gt;    	&lt;BR /&gt;        int myHour = new Double(InputTime * hourInDay).intValue();&lt;BR /&gt;        int myMin  = new Double((InputTime * minInDay) - (myHour * 60)).intValue();&lt;BR /&gt;        int mySec  = new Double((InputTime * secInDay) - ((myHour * 3600) + (myMin * 60))).intValue();&lt;BR /&gt;        &lt;BR /&gt;        if(myHour &amp;lt; 10) {&lt;BR /&gt;        	myHourStringRep = "0" + myHour;&lt;BR /&gt;        }else {&lt;BR /&gt;        	myHourStringRep = "" + myHour;&lt;BR /&gt;        }&lt;BR /&gt;        &lt;BR /&gt;        if(myMin &amp;lt; 10) {&lt;BR /&gt;        	myMinInDayStringRep = "0" + myMin;&lt;BR /&gt;        }else {&lt;BR /&gt;        	myMinInDayStringRep = "" + myMin;&lt;BR /&gt;        }&lt;BR /&gt;        &lt;BR /&gt;        if(mySec &amp;lt; 10) {&lt;BR /&gt;        	secInDayStringRep = "0" + mySec;&lt;BR /&gt;        }else {&lt;BR /&gt;        	secInDayStringRep = "" + mySec;&lt;BR /&gt;        }&lt;BR /&gt;        &lt;BR /&gt;        return myHourStringRep + ":" + myMinInDayStringRep + ":" + secInDayStringRep;&lt;BR /&gt;    }&lt;BR /&gt;}</description>
      <pubDate>Tue, 07 Jun 2011 13:59:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260541#M41649</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-07T13:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260542#M41650</link>
      <description>Thanks for help to convert number format from excel to normal time . 
&lt;BR /&gt;however I am facing new problem where I am having date and time as number format from excel (40682.55946
&lt;BR /&gt;) and needs to convert to be date and time look like e.g. 2011-06-09T09:06:21
&lt;BR /&gt;I am able to convert time but not sure how to add now date or convert number above as date and time and to input "T" between as my xml schema in database only accepting format as I stated 2011-06-09T09:06:21.
&lt;BR /&gt;I have to stated that I am database developer not java , tried to find some solution on internet but not really with luck..
&lt;BR /&gt;Thanks
&lt;BR /&gt;Zeljka</description>
      <pubDate>Thu, 09 Jun 2011 09:45:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260542#M41650</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-09T09:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260543#M41651</link>
      <description>Excel Dates are serial values based on 1 Jan 1900.
&lt;BR /&gt;so the easy way to convert from the serial value to a "real" date is to simply add days to the date:
&lt;BR /&gt;so in a tJavaRow:
&lt;BR /&gt;
&lt;PRE&gt;String dt = "1900-01-01";  // Start date&lt;BR /&gt;SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");&lt;BR /&gt;Calendar c = Calendar.getInstance();&lt;BR /&gt;c.setTime(sdf.parse(dt));&lt;BR /&gt;c.add(Calendar.DATE, input_row.EXCEL_DATE.intValue() );  // number of days to add&lt;BR /&gt;output_row.REAL_DATE= sdf.format(c.getTime());&lt;/PRE&gt;
&lt;BR /&gt;edit: syntax error!</description>
      <pubDate>Thu, 09 Jun 2011 15:53:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260543#M41651</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-09T15:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260544#M41652</link>
      <description>Sorry John but this is not working for me as my data type for this input row is string as I am converting time to be in normal format but I have notice that I am having in excel now number 40682.55946 
&lt;BR /&gt; which probably is date and time in one . 
&lt;BR /&gt;My question will be is any way that I can update my existiong routine which I am using to convet number to time , I now update this routines and convet completed number 40682.55946 
&lt;BR /&gt; to be date and time . 
&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 09 Jun 2011 16:52:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260544#M41652</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-09T16:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: convert time</title>
      <link>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260545#M41653</link>
      <description>?eljka? Each time you have a problem you wake up the whole cavalry 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133049iD780B7DE0116E4D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACJ.png" alt="0683p000009MACJ.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Let me just add a bit of a make up on Mr. GarretMartin's idea, who basically solved the problem. 
&lt;BR /&gt;First make sure you add this at the beginning of the routine: 
&lt;BR /&gt; 
&lt;PRE&gt;import java.text.SimpleDateFormat;&lt;BR /&gt;import java.util.Calendar;&lt;/PRE&gt; 
&lt;BR /&gt;Now add new function: 
&lt;BR /&gt; 
&lt;PRE&gt; /**&lt;BR /&gt;	 * Convert ExcelDateTime Jan1900 serial date values in the way ZeljkaMom Wants&lt;BR /&gt;	 * &lt;BR /&gt;	 * &lt;BR /&gt;	 * {talendTypes} String&lt;BR /&gt;	 * &lt;BR /&gt;	 * {Category} User Defined&lt;BR /&gt;	 * &lt;BR /&gt;	 * {param} double(40682.55946)&lt;BR /&gt;	 * &lt;BR /&gt;	 * {example} DateTime(40792.3794097222) # 2011-06-09T09:06:21&lt;BR /&gt;     * @throws ParseException &lt;BR /&gt;	 */&lt;BR /&gt;	public static String DateTime(Double DateTimeXLS) throws ParseException {&lt;BR /&gt;		// Hardcoded start date - since Excel serial values based on 01.01.1900 are assumed&lt;BR /&gt;		String dt = "1899-12-30 00:00:00";&lt;BR /&gt;		&lt;BR /&gt;		int secInDay = 86400;&lt;BR /&gt;        int minInDay = 1440;&lt;BR /&gt;        int hourInDay = 24;&lt;BR /&gt;        &lt;BR /&gt;        Double InputTime = DateTimeXLS - DateTimeXLS.intValue();&lt;BR /&gt;        &lt;BR /&gt;        int myHour = new Double(InputTime * hourInDay).intValue();&lt;BR /&gt;        int myMin  = new Double((InputTime * minInDay) - (myHour * 60)).intValue();&lt;BR /&gt;        int mySec  = new Double((InputTime * secInDay) - ((myHour * 3600) + (myMin * 60))).intValue();&lt;BR /&gt;        &lt;BR /&gt;		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");&lt;BR /&gt;		SimpleDateFormat sdf_date = new SimpleDateFormat("yyyy-MM-dd");&lt;BR /&gt;		SimpleDateFormat sdf_time = new SimpleDateFormat("HH:mm:ss");&lt;BR /&gt;		&lt;BR /&gt;		Calendar c = Calendar.getInstance();&lt;BR /&gt;		c.setTime(sdf.parse(dt));&lt;BR /&gt;		&lt;BR /&gt;		// number of days/hours/minutes/seconds to add&lt;BR /&gt;		c.add(Calendar.DATE, DateTimeXLS.intValue());&lt;BR /&gt;		c.add(Calendar.HOUR, myHour);&lt;BR /&gt;		c.add(Calendar.MINUTE, myMin);&lt;BR /&gt;		c.add(Calendar.SECOND, mySec);&lt;BR /&gt;		&lt;BR /&gt;		return sdf_date.format(c.getTime()) + "T" + sdf_time.format(c.getTime()); &lt;BR /&gt;	}&lt;/PRE&gt; 
&lt;BR /&gt;You can call it from within tJavaRow component like: 
&lt;BR /&gt; 
&lt;PRE&gt;output_row.dt_datetime_string = myfuncs.DateTime(input_row.dt_value);&lt;/PRE&gt; 
&lt;BR /&gt;But first test it. Adding years is a bit tricky. As you can see I had to change the starting date to be 1899-12-30 instead of a 1900-01-01, because I was getting an offset of 2 days always. Maybe the Excel and Java are not calculating the leap years in the same way or it might be the problem with time of the day at interval start (like is it 1900-01-01 day-end or day-start?) or something else... Anyway I think this should work.</description>
      <pubDate>Fri, 10 Jun 2011 13:22:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/convert-time/m-p/2260545#M41653</guid>
      <dc:creator>vladika</dc:creator>
      <dc:date>2011-06-10T13:22:11Z</dc:date>
    </item>
  </channel>
</rss>

