Skip to main content
i want to convert from date format 01.12.2000 to 2000 in one attribute

 

 

some times it is working great with my input excel files and some files show me this msg .

 

The below feature caused the translation to be terminated

DateTimeConverter_2_<Rejected>(TeeFactory): DateTimeConverter_2_<Rejected>

 

what is important for me to read the last 4 digit

 

Could someone provide me solution for this issue .

Thanks for help

You'd normally get that message when you try and convert a value that isn't a date. If you only ever need the last four digits you could get this without converting the date using the following in an attributecreator

@Right(@Value(attrname),4)

But best to check the rejected data as it sounds like you have some data that doesn't contain a date. If you have some null or empty values, you can set the DateTimeConverter to pass through empty or null values


You'd normally get that message when you try and convert a value that isn't a date. If you only ever need the last four digits you could get this without converting the date using the following in an attributecreator

@Right(@Value(attrname),4)

But best to check the rejected data as it sounds like you have some data that doesn't contain a date. If you have some null or empty values, you can set the DateTimeConverter to pass through empty or null values

Thanks for ur reply ,and explaination . i will check that


You'd normally get that message when you try and convert a value that isn't a date. If you only ever need the last four digits you could get this without converting the date using the following in an attributecreator

@Right(@Value(attrname),4)

But best to check the rejected data as it sounds like you have some data that doesn't contain a date. If you have some null or empty values, you can set the DateTimeConverter to pass through empty or null values

@ebygomm Thanks man but i write left instead of right bcs it reads the date not correct,idk why 04.11.2010 it reads  2010.11.04 and u were right i have null in date but it is okey nw but do u know solution of readin date in wrong direction ,i did left instead of right so it is correct but if i want to fix it.what should i do


@ebygomm Thanks man but i write left instead of right bcs it reads the date not correct,idk why 04.11.2010 it reads 2010.11.04 and u were right i have null in date but it is okey nw but do u know solution of readin date in wrong direction ,i did left instead of right so it is correct but if i want to fix it.what should i do

Do you have the input format set? Is the date you've given the 4th November or the 11th April? If the 4th of November the Input Format should be %Y.%m.%d$


Reply