• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] [URGENT] Impossible to convert from Boolean to Date

#1 2012-03-09 12:56:15

ienax_ridens
Member
Registered: 2010-10-27
Posts: 50

[resolved] [URGENT] Impossible to convert from Boolean to Date

My problem is very simple:

from excel file I load a Date as String, in tMap I want to put that value in a Date field and I used the following function:

TalendDate.isDate(rowN.DATE, "ddMMyyyy")

...but when I build the job, I have the error "Impossible to convert Bolean value to a Date value".

--------------

I've tried also many other methods (e.g. load directly Date values from excel, .xls and .xlsx), but I had other problems.
I tried also to format the values as strings in the excel and in the schema of input excel, format date fields as Date, but error also in this case...I don't  have ideas any more...

Talend 4.1.1

--------------

Thanks to all

Offline

#2 2012-03-09 13:16:01

walkerca
Member
Company: Bekwam, Inc.
Registered: 2011-01-12
Posts: 253
Website

Re: [resolved] [URGENT] Impossible to convert from Boolean to Date

Hi,

isDate() is returning a boolean, so it can't be used in a date assignment.  If you have a date string, try TalendDate.parseDate("ddMMyyyy", rowN.DATE).

Even though it looks like you have a string in an Excel date field, it's actually a number plus a format.  This blog post suggests defining the Date field in the Excel input schema: http://bekwam.blogspot.com/2011/03/exce … udio.html.


Visit bekwam.blogspot.com for Talend topics and tutorials.  Twitter @bekwaminc for updates.

Offline

#3 2012-03-09 14:08:06

ienax_ridens
Member
Registered: 2010-10-27
Posts: 50

Re: [resolved] [URGENT] Impossible to convert from Boolean to Date

walkerca wrote:

Hi,

isDate() is returning a boolean, so it can't be used in a date assignment.  If you have a date string, try TalendDate.parseDate("ddMMyyyy", rowN.DATE).

Even though it looks like you have a string in an Excel date field, it's actually a number plus a format.  This blog post suggests defining the Date field in the Excel input schema: http://bekwam.blogspot.com/2011/03/exce … udio.html.

Thanks a lot walkerca!
Now I have not the error (even if I have "Null Pointer exeption, but I think it is relative to another thing).

Thank you again

Offline

#4 2012-03-09 17:23:48

JohnGarrettMartin
Member
Registered: 2009-01-07
Posts: 762

Re: [resolved] [URGENT] Impossible to convert from Boolean to Date

not a solution, but it seems relevant to this discussion wink


Uploaded Images

Offline

#5 2012-03-12 11:58:08

pcoffre
Talend Team
Registered: 2009-03-26
Posts: 526
Website

Re: [resolved] [URGENT] Impossible to convert from Boolean to Date

Very funny John! big_smile


Follow Talend on Twitter, Linkedin, Facebook and the forum.
Download and try Talend solutions

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] [URGENT] Impossible to convert from Boolean to Date

Board footer

Powered by FluxBB