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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] HELP - GET SUBSTRING OF DATE

Dear all,

I have a date format which look like that:  2015-10-25T00:00:00+02:00
May somebody tell me how get only 2015-10-25 in my XMLMap
I precise in tXMLMap, because i get this date format with component tXMLMap
And i try to put string type, but i get Unparseable date error

Thanks,

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

hi IDEMBELE,
you say that you've got a date format & try to put String type.
could not read this data directly as a String ? When you manage data in Talend, use Date type only when you need java methods about Date.
otherwize only use String.
And use String method like substring 0683p000009MA9p.png

hope it help
regards
laurent

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Dear all,
I tried to parse it by doing :
TalendDate.formatDate("yyyy-MM-dd'T'HH:mm:ss Z",2015-10-25T00:00:00+02:00  )
or
TalendDate.formatDate("yyyy-MM-dd'T'HH:mm:ss Z",2015-10-25T00:00:00+02:00 )

But it does not work, help me please
Anonymous
Not applicable
Author

hi IDEMBELE,
you say that you've got a date format & try to put String type.
could not read this data directly as a String ? When you manage data in Talend, use Date type only when you need java methods about Date.
otherwize only use String.
And use String method like substring 0683p000009MA9p.png

hope it help
regards
laurent
Anonymous
Not applicable
Author

Hi kzone,
No it is not possible to read it as a string, i have already tried it.
And i get error, so i am obliged to format it first in string and get sub-string
Thanks,
Anonymous
Not applicable
Author

Hi kzone,
You are right, it is ok to set string format.
Thank you