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: 
Not applicable

How to change single numbe ex.20080601 into date

Dear QlikView users,

I started to work with QlikView two days ago, and although I'm amazed by the possibilities it offers I found some problem. Could enyone tell me how to change single number ex. 20080601 into date 01-06-2008? The date of my orders is saved like this;( I am able to do it in excel, but here it doesn't work.

I would appreciate help,

Beata

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

You need to change the order so that you write the expression first and then the name of the field:

date(date#(20080601, 'YYYYMMDD'), 'DD-MM-YYYY') as OrderDatum

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hi Beata,

You can use date#() to tell QlikView how to interpret the number, for example:

date#(20080601, 'YYYYMMDD')

Then you can use date() to tell QlikView how to format the presentation of the date:

date(date#(20080601, 'YYYYMMDD'), 'DD-MM-YYYY')

Not applicable
Author

Dear Johannes,

Thank you for a quick answer. I am sorry for a new basic question- should I do it in script? For example when I write: Order date as date# (20080601, 'YYYYMMDD') it has mistake when reloading.

Thank you very much in advance,

Beata

Anonymous
Not applicable
Author

Hi,

You need to change the order so that you write the expression first and then the name of the field:

date(date#(20080601, 'YYYYMMDD'), 'DD-MM-YYYY') as OrderDatum

Not applicable
Author

Hi,

It works great, thank you very much! The final formula is: date(date#(Orderdatum, 'YYYYMMDD'), 'DD-MM-YYYY') as OrderDatum.

Have a nice day,

Regards,

Beata Jablonska