Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a requirement to extract date and time as separate column from the same column.
my input column has data like "2018-09-27 18:48:24"
i want column1 to have data like "2018-09-27" and column2 to "18:48:24".
i tried TalendDate.formatDate("yyyy-MM-dd", input column name), but it didn't worked.
Hi @knknaveen ,
i have made changes as per you screenshot and script,but syill i'm getting below error.
[statistics] connecting to socket on port 4045
[statistics] connected
Exception in component tMap_1 (STG_TO_WAREHOUSE_REPO)
java.lang.RuntimeException: java.text.ParseException: Unparseable date: "2019-06-01"
at routines.TalendDate.parseDate(TalendDate.java:942)
at routines.TalendDate.parseDate(TalendDate.java:886)
at local_project.stg_to_warehouse_repo_0_1.STG_TO_WAREHOUSE_REPO.tDBInput_2_inProcess(STG_TO_WAREHOUSE_REPO.java:2468)
at local_project.stg_to_warehouse_repo_0_1.STG_TO_WAREHOUSE_REPO.runJobInTOS(STG_TO_WAREHOUSE_REPO.java:5829)
at local_project.stg_to_warehouse_repo_0_1.STG_TO_WAREHOUSE_REPO.main(STG_TO_WAREHOUSE_REPO.java:5678)
Caused by: java.text.ParseException: Unparseable date: "2019-06-01"
at java.text.DateFormat.parse(DateFormat.java:366)
at routines.TalendDate.parseDate(TalendDate.java:928)
... 4 more
[statistics] disconnected
Thank you @shong , date issue looks resolved, but time is still giving error as it has issues.
Hi @shong ,
I found that the source column had data only for HH:mm so i changed the from HH:mm:ss to HH:mm. it worked.