Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ftobias1677780896
Contributor
Contributor

TalendDate.parseDate giving unexpected output

Hello, I am using TalendDate.parseDate in tMap but I am getting unexpected results.

I am processing many files, all the same format, but some files are not returning a correct date. Please see below:

  • tMap
    • expression "TalendDate.parseDate("yyyyMMdd",StringHandling.LEFT(row4.start,8)) "
    • Date pattern "MM-dd-yyyy"
  • Data in file
    • start

      ="

      20230213 00:23:11

      "

  • output

    • 02-44-2023

All my files have the same field and same beginning format. I am not sure if this is a Talend bug or corrupt data

Any ideas are welcomed!

Thanks

Labels (2)
1 Reply
Anonymous
Not applicable

Hi

For debugging, print the value of StringHandling.LEFT(row4.start,8), to check if it returns the expected string before it is parsed to a Date.

 

Regards

Shong