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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Converting date (number) to text

Hello,

I read a lot of posts about converting dates to various formats, but still can not get a correct presentation in my chart. Here is my problem:

I have a date field "Datum", I selected a single date (May 13, 2013).

When I put "=Datum" in a chart or textbox is represented as "41407".

To get this represented as "13-05-2013" I tried "=Date(Datum,'DD-MM-YYYY')", but this results in "-".

When I try "=Date(41407,'DD-MM-YYYY')" it is represented as "13-05-2013".

As information, in the script I use: Date#(Datum,'DD/MM/YYYY') AS Datum

Anyone any ideas? Many thanks

Btw I did also try various other combinations like

Date(Date#(Datum,'DD/MM/YYYY'),'DD/MM/YYYY')

1 Solution

Accepted Solutions
anandathome
Creator
Creator

you can try

Date(Date#(Datum),'DD/MM/YYYY')

OR

Date(num#(Datum),'DD/MM/YYYY')

How to format will definitely depend on how it is in source and

how you are interpreting it in script.

View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try giving it a date display format in the script:

Date(Date#(Datum,'DD/MM/YYYY'),'DD-MM-YYYY') AS Datum


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks for the tip, I'll try it (reload will take some time)

anandathome
Creator
Creator

you can try

Date(Date#(Datum),'DD/MM/YYYY')

OR

Date(num#(Datum),'DD/MM/YYYY')

How to format will definitely depend on how it is in source and

how you are interpreting it in script.

Not applicable
Author

Thank you, Date(num#(Datum),'DD/MM/YYYY') did the trick!