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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data to show in between to dates

Hello Everybody,

I need to show  ‘Date of visit’ >= ‘Refresh Date’ AND ‘Date of visit’  < ‘Refresh Date + 90 days’

for this I have written the code as

 

date

([Date of Visit],'dd/MM/yyyy')>= date(ReloadTime()) and [Date of Visit] < Month(AddMonths(date(ReloadTime()),+3));

But it's not showing any data.

Could any one please help.

Urgent.

Thanks in Advanse

Ashish

Message was edited by: ashish das

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

8 Replies
MK_QSL
MVP
MVP

ReloadTime() is giving you TimeStamp so you need to use something like below

Date(Floor(ReloadTime()))

or

Date(Floor(ReloadTime()),'DD/MM/YYYY')

Also, use DD/MM/YYYY instead of dd/MM/yyyy.

Not applicable
Author

Hi Manish,

Thanks for your reply.

Using thebelow code also am  getting Null.

 

date

([Date of Visit],'dd/mm/yyyy')>= date(Floor(ReloadTime()),'dd/mm/yyyy') and ([Date of Visit]) < Month(AddMonths(date(Floor(ReloadTime()),'dd/mm/yyyy'),+3))

where as using

 

month

(AddMonths(Date(Floor(ReloadTime()),'DD/MM/YYYY'),+3))

am getting the value as Jul which is correct.

Could you please tell me whats wrong in my code.

Many Thanks

Ashish

MK_QSL
MVP
MVP

Provide Sample data if possible..

Not applicable
Author

Hi Manish,

Please find the attached sample file.

Thanks

MK_QSL
MVP
MVP

What you want as end result?

The aggregation functions missing here...

i.e. SUM, AVG, Min, Max ...

Not applicable
Author

Hi Manish,

I just want to filter out the data with the ‘Date of visit’ >= ‘Refresh Date’ AND ‘Date of visit’  < ‘Refresh Date + 90 days’.

In script I put the below where condition and loaded it. But it was giving me zero records.

date([Date of Visit],'dd/mm/yyyy')>= date(Floor(ReloadTime()),'dd/mm/yyyy') and ([Date of Visit]) < Month(AddMonths(date(Floor(ReloadTime()),'dd/mm/yyyy'),+3))

Anonymous
Not applicable
Author

hi,

MK_QSL
MVP
MVP

IF(

  Date(Floor(Timestamp#([Date of Visit],'YYYY-MM-DD hh:mm:ss'))) >= Date(Floor(ReloadTime())) and

  Date(Floor(Timestamp#([Date of Visit],'YYYY-MM-DD hh:mm:ss'))) < Date(Floor(TimeStamp(AddMonths(ReloadTime(),3)))),

  Date(Floor(Timestamp#([Date of Visit],'YYYY-MM-DD hh:mm:ss'))))