Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
rolandraijmaker
Contributor II
Contributor II

Loading date fields from string values

I've got a question on formating while loading date fields from a source.

Mij date fields has the format "2016-04-07T17:41:01Z"

For this date to be imported as a date field I use 2 replace functions to get rid of the T and Z sign.

In the next step I use Date#( to convert it to a datefield and with Date( I format it.

This looks like this and works

Date(Date#(Replace(Replace(DATEFIELD,  'T',' '),'Z',''), 'YYYY-MM-DD hh:mm:ss'), 'DD-MM-YYYY')              as DATEFIELD

My question;  has anyone a sollution to make this statement simpler / more elegant.

Roland Raijmakers

1 Reply
sunny_talwar

Have you tried this may be:

Date(Date#(Left(DATEFIELD, 10), 'YYYY-MM-DD'), 'DD-MM-YYYY') as DATEFIELD