Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to read date from TXT file in talend job, dates can be changed whenever the user wants. Date format is like 23_2_2023. And also save files from input before and after changes in file name as a back up using tfile copy .
Hi
Using tFileInputDelimited to read a txt file, select 'Date' type for the date column on the schema and set the date pattern as "dd_M_yyyy".
Regards
Shong
But we are using tcontext component for how to do it further
Using tContextLoad to load the values of context variables? If so, you can only read the data as a string from TXT file, if you need to use the value as a Date, you can convert the string to a Date with the below expression:
TalendDate.parseDate("dd_M_yyyy", context.varName)