Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
thomas_2583
Contributor III
Contributor III

Convert excel General to Date time

Hi,

I have a date time in excel formatted as 'General' which outputs as this: 24/04/2023 13:54:50.

I am trying to bring this date time into the data warehouse but getting an error on the TMap.

The Tmap has this as a string and I am using this to convert to a date time TalendDate.parseDate("dd/MM/yyyy HH:mm", row1.test_date_time)  but get the following error message, any idea how to resolve this please?

Exception in component tMap_1 (DIM_morts)

java.lang.RuntimeException: java.text.ParseException: Unparseable date: "Mon Apr 24 13:54:50 BST 2023"

at routines.TalendDate.parseDate(TalendDate.java:971)

at routines.TalendDate.parseDate(TalendDate.java:915)

at signal.dim_snapshots_new_0_1.

DIM_morts

.tFileInputExcel_1Process(

DIM_morts

.java:1273)

at signal.dim_snapshots_new_0_1.

DIM_morts

.runJobInTOS(

DIM_morts

.java:1911)

at signal.dim_snapshots_new_0_1.

DIM_morts

.main(

DIM_morts

.java:1749)

Caused by: java.text.ParseException: Unparseable date: "Mon Apr 24 13:54:50 BST 2023"

at java.base/java.text.DateFormat.parse(DateFormat.java:399)

at routines.TalendDate.parseDate(TalendDate.java:957)

... 4 more

[statistics] disconnected

Labels (3)
1 Reply
jlolling
Creator III
Creator III

The problem is you read the date as String and that cause the component to convert the date value into a String by using the Java default pattern (thats what you see).

Please not not read it as String, read it as Date typed column!