Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist III
Specialist III

display days

Hi all,

\

I am calculating the days     but am getting the wrong out output

11 Replies
Highlighted
Master II
Master II

Load *,

num(Date#('07/19/2017','MM/DD/YYYY'))-num(Date#(OpenDate,'MM/DD/YYYY')) as [Open Days]

num(Date#('07/19/2017','MM/DD/YYYY'))-num(Date#(Update Time,'MM/DD/YYYY')) as [Last Updated Days]

Highlighted

If [Open Date] is the format of DD/MM/YYYY then try like below

MakeDate(2017, 07, 19) - Date([Open Date], YYYY-MM-DD) as [Open Days],

MakeDate(2017, 07, 19) - [Update Time] as [Last Updated Days];

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Creator III
Creator III

convert '7/19/2017' to date format

Data:

Load *, Date(date#('7/19/2017','MM/DD/YYYY'))-[Open Date] as [Open Days],

  Date(date#('7/19/2017','MM/DD/YYYY'))-[Update Time] as [Last Updated Days];

Highlighted
Specialist III
Specialist III

its not working same result came 

Highlighted

My expressions may frequent to you. Will you check?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Specialist III
Specialist III

this is also not giving anil

Highlighted

May be share sample data in excel?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Creator II
Creator II

Try using this expression

LOAD

     Open_Date,

     Update_Date,

     DayNumberOfYear(Date('01/03/2017','DD/MM/YYYY') - Date(Open_Date,'DD/MM/YYYY')) as Open_Days

FROM

You_Table

Hope This helps.

Highlighted
Creator III
Creator III

Data:

Load *,

Date(date#('7/19/2017','MM/DD/YYYY'),'MM/DD/YYYY')-Date([Open Date],'MM/DD/YYYY') as [Open Days],

  Date(date#('7/19/2017','MM/DD/YYYY'),'MM/DD/YYYY')-Date([Update Time],'MM/DD/YYYY') as [Last Updated Days];