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: 
LDPtechAFB
Contributor III
Contributor III

Multiple date possibilities in Talend Schema

Hello, I'm trying to extract some dates from files but the date format could change between theses files.

How can I put differents date model in my schema ?

for example : file 1 (format date)

"yyyy-MM-dd'T'HH:mm:ssXXX"

file 2 (format date) :

"yyyy-MM-dd'T'HH:mm:ss.SSSSSSSXXX"

i looked some regex stuff and i did a thing that looks like :

[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].*[0-9]*[0-9]*\+[0-9][0-9]:[0-9][0-9]

but i cannot implement this kind of datas.

Could you explain me how to solve my problem ?

Regards

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi

It is impossible to defined multiple date pattern on schema. The workaround is to read the value as a string from file, then check the length of string, and use different date pattern to parse the string and convert it to a Date in the job.

 

Regards

Shong

View solution in original post

1 Reply
Anonymous
Not applicable

Hi

It is impossible to defined multiple date pattern on schema. The workaround is to read the value as a string from file, then check the length of string, and use different date pattern to parse the string and convert it to a Date in the job.

 

Regards

Shong