Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

zagzebski
Contributor

From Date format to number format

I don't understand a date field I have. It makes it through two layers of scripting and appears as a date, but in the final model it turns to a number. Can someone tell me why it would change in the final model?

My EFFECTIVE DATE field:

Base Load - 7/21/2013

ETL Load - 7/21/2013

Final Model - 41476

2 Replies
MVP & Luminary
MVP & Luminary

Re: From Date format to number format

A date is actually a number. With the date() function it can also be given a text format. It will still be a number, but now also has a display text format. So in the load script you can put the date() function around it to give it a date format of your choice: date([EFFECTIVE DATE], 'DD-MM-YYYY') as [EFFECTIVE DATE]


talk is cheap, supply exceeds demand
zagzebski
Contributor

Re: From Date format to number format

Thanks! I guess I understand that just couldn't figure why in the first two scripts it has the date MM/DD/YYYY format, then in the final model it switched to a number format. How does the same field have a different format as it works its way through several scripts?