Please me on this below code. I have to change a date column to string type and the validate that whether it is valid date or not?
For validation it should come 0 or 1 a s output.
You have specified that you want to convert a date column to String and then validate whether its date. First of all, if the input column is having date data type, it will be always succeed in validation. So I assume your query is to check whether an input string is date or not. If has to give 1 as output if its a date value and 0 if its not a date value.
Please refer the below solution for this scenario.
The function is as shown below.
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Convert String to Date :
Convert Int to Date :
TalendDate.parseDate("yyyyMMdd", Integer.toString(Var.date_int) )
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Learn how to make your data more available, reduce costs and cut your build time
Read about OTTO's experiences with Big Data and Personalized Experiences
Take a look at this video about Talend Integration with Databricks