Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Extract a number from a cell and turn it in a date

Hey everyone,

I have some datas (from a particular colomn) that are showed like this in my source: 20131022 ****** Projects, Operations and maintenance quarterly review

I would like to extract and transform the 8 first numbers in a date.

In my example: 20131022 will be extracted and transformed in the date 22/10/2013.

I dont know how to do this in the script for this particular colomn called "List Name".

Thanks in advance,

best regards,

Arnaud

1 Solution

Accepted Solutions

Re: Extract a number from a cell and turn it in a date

date(date#(left([List Name],8),'YYYYMMDD'),'DD/MM/YYYY')


talk is cheap, supply exceeds demand
3 Replies

Re: Extract a number from a cell and turn it in a date

date(date#(left([List Name],8),'YYYYMMDD'),'DD/MM/YYYY')


talk is cheap, supply exceeds demand
Not applicable

Re: Extract a number from a cell and turn it in a date

Hi Arnaud,

You should use a expression like this

date(left([List Name], 8), 'YYYYMMDD') as [List Name]

Not applicable

Re: Extract a number from a cell and turn it in a date

To begin with you can use for example left(FieldName,8) to get the 8 carachers you need.

Then you can wrap a date# function around it to format the date

Date#(left(YourFieldName,8),'YYYYMMDD') as Date,

Community Browser