• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » How to convert Double DataType in Date

#1 2008-04-22 14:43:33

DjeCepap
Member
Registered: 2008-01-28
Posts: 24

How to convert Double DataType in Date

Tags: [date, java, tos2.3.2]

Hi;

How can one convert a Data Type 'Double' field containing a date (Example: 20020626E7)  to date for Oracle.
I tested several solution with the  standards functions of TALEND 2.2 but I always have an exception. The last test is as follows.

TalendDate.parseDate("yyyyMMdd",Mathematical.FFIX(row1.CDOFH_DATCDE,0))  Where row1.CDOFH_DATCDE is a field contening Data Type Double.

The exception

tarting job VmsToOra_Hislcdof_REc at 14:39 22/04/2008.
[statistics] connecting to socket on port 3531
[statistics] connected
[trace] connecting to socket on port 4620
[trace] connected
Exception in component tMap_1
java.lang.RuntimeException: java.text.ParseException: Unparseable date: "2.0020626E7"
    at routines.TalendDate.parseDate(TalendDate.java:89)

Offline

#2 2008-04-22 18:59:47

emenuet
Talend team
Registered: 2008-04-17
Posts: 144
Website

Re: How to convert Double DataType in Date

You can use :
TalendDate.parseDate("yyyyMMdd",String.format("%8.0f",row1.CDOFH_DATCDE))

Offline

#3 2008-04-29 10:57:06

DjeCepap
Member
Registered: 2008-01-28
Posts: 24

Re: How to convert Double DataType in Date

Thinks for all

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » How to convert Double DataType in Date

Board footer

Powered by FluxBB