Date Issue

Eight Stars

Date Issue

I am getting date as 1/1/1800 from the input excel. Type is String. How to pass this value to destination Database. 

 

I received an error that its "Unparseable date" Please suggest

Tags (1)

Accepted Solutions
Seven Stars

Re: Date Issue

hi @samisyed80 

try giving if condition based on the date format inside tmap and check whether it is working or not 


All Replies
Seven Stars

Re: Date Issue

Hi @samisyed80

 

If 1/1/1800 is of the format M/d/yyyy then parse it as TalendDate.parseDate("M/d/yyyy",row1.date) in the target while parsing from the excel .Please make change in the parsedate function based on the format in the source.

 

 

Eight Stars

Re: Date Issue

Hi Rengen,

 

I am already having this code for other proper date's from the input. Only 3 rows are having this 1/1/1800 (m/d/yyyy). Please suggest how to handle this now

 

("".equals(row1.Date) || row1.Date == null ? null : TalendDate.parseDateLocale("EEE MMM dd HH:mm:ss zzz yyyy",row1.Date,"EN"))

Tags (1)
Seven Stars

Re: Date Issue

hi @samisyed80 

try giving if condition based on the date format inside tmap and check whether it is working or not 

Eight Stars

Re: Date Issue

Thanks rengan its resolved

Seven Stars

Re: Date Issue

Thanks for the update

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch