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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
danialier
Creator III
Creator III

Convert a number to a date

Hi,

I have the following formula which should give a date but instead it gives a number...

=if(GetCurrentField("period")='Week',[Publish Date week],[Publish Date month forum topics])

Do you know how to ersolve this ?

thks,dani

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

=if(GetCurrentField("period")='Week',Date([Publish Date week]),Date([Publish Date month forum topics]))

View solution in original post

3 Replies
MK_QSL
MVP
MVP

=if(GetCurrentField("period")='Week',Date([Publish Date week]),Date([Publish Date month forum topics]))

jsingh71
Partner - Specialist
Partner - Specialist

use this:

if(GetCurrentField("period")='Week',Date([Publish Date week],'MM/DD/YYYY'),Date([Publish Date month forum topics].'MM/DD/YYYY'))

sudeepkm
Specialist III
Specialist III

you may probably use the Date format function at the script level to avoid the function being invoked when the chart is rendered.