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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rbecher
Partner - Master III
Partner - Master III

converting date from xml file

Hello,

I have to read a xml file with a date value in this format:

'Thu Apr 01 00:00:00 CEST 2010'
'Fri Jan 01 00:00:00 CET 2010'

I've tried without the time like this

'Thu Apr 01 2010'
'Fri Jan 01 2010'

date(date#(field, 'WWW MMM DD YYYY'))

but can not convert it to a date. What is wrong?

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Labels (1)
1 Solution

Accepted Solutions
rbecher
Partner - Master III
Partner - Master III
Author

..sometimes you do not see the forest for the trees. Smile

I just had to strip the redundant day (WWW) like this:

date(date#(trim(mid(field, 5, 7) & right(field, 4)), 'MMM DD YYYY')) as startPeriod

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine

View solution in original post

1 Reply
rbecher
Partner - Master III
Partner - Master III
Author

..sometimes you do not see the forest for the trees. Smile

I just had to strip the redundant day (WWW) like this:

date(date#(trim(mid(field, 5, 7) & right(field, 4)), 'MMM DD YYYY')) as startPeriod

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine