Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello talendians,
I want to pass a default value of "01-01-1000" to a column. The data pattern for the column is required to be " EEE MMM dd hh:mm:ss zzz yyy" and is also the same in all downstream components. Can you tell me how to write an expression in tmap?
i tried using TalendDate.parseDate("yyyy-MM-dd","1000-01-01") but it didn't work. Can you please help me on this?
The column need to always have the constant value of 1000-01-01. The column is of type date with pattern "EEE MMM dd hh:mm:ss:zzz yyyy". I am then passing this as input to txmlmap. I am seeing the following error:
Also attached a screenshot below. Please advice how to proceed. Thanks in advance.
-----------------------------
| label | ODateFormat[objectConverters=null, stringConverters=null]conversion error while handling input string '01-01-1000' |
| description | com.onwbp.adaptation.UowErrorWithUserMessage: The current value [01-01-1000] is not compatible with the type of the current node [/root/reference/productManagement/sourceLineItemXref/businessEffectivePeriod/businessEffectiveFrom].
at com.orchestranetworks.service.OperationException.createError(OperationException.java:3)
at com.onwbp.adaptation.ximport.g.endCurrentElement(g.java:40)
------------------------------------------
I have used TalendDate.parseDate("MM-dd-yyyy","01-01-1000") within my tmap like you suggested and it still throws the same error. I just want to reiterate that i am using data pattern "EEE MMM dd hh:mm:ss:zzz yyyy" everywhere for the column.
@shong Any idea on this?
Hi shong, I was able to resolve it fairly quickly. I used the following and it worked.
TalendDate.parseDate("yyyy-MM-dd","1000-01-01")