Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
parthesh
Contributor

Urgent!!!! Set analysis for Date time column less than today().

 

Start date Active column is having value as per below

01/03/2019 12:00:00 AM

To put condition like  START_DATE_ACTIVE<today-1

I am Using below set analysis but it is not working for me

START_DATE_ACTIVE = {"< $(=date(Today()-1,dd/MM/yyyy hh:mm:ss TT))"}

 

please let me know if i am missing anything , or any other way to achieve this.

Tags (2)
5 Replies
dilipranjith
Honored Contributor

Re: Urgent!!!! Set analysis for Date time column less than today().

you missed single quotes inside the date function 'dd/MM/yyyy hh:mm:ss TT'
parthesh
Contributor

Re: Urgent!!!! Set analysis for Date time column less than today().

thanks for your reply,

 

if i am using START_DATE_ACTIVE = {"< $(=date(Today()-1,dd/MM/yyyy hh:mm:ss TT))"} than it is returning all rows.

and if i am using START_DATE_ACTIVE = {"< $(=date(Today()-1,'dd/MM/yyyy hh:mm:ss TT'))"} it is not returning any rows. 

dont know why... 😞

 

dilipranjith
Honored Contributor

Re: Urgent!!!! Set analysis for Date time column less than today().

not sure it looks ok. hard to diagnose without an app

try below (basically avoid all the format issues

START_DATE_ACTIVE = {"<$(=floor(Now())-1))"}

dilipranjith
Honored Contributor

Re: Urgent!!!! Set analysis for Date time column less than today().

check data type of your START_DATE_ACTIVE column too to make sure it is timestamp not string
andrei_delta
Contributor II

Re: Urgent!!!! Set analysis for Date time column less than today().

hi,

i think your date field is numerical but only the display of it is as timestamp and you could try with num(today()-1) in your condition.

hope it helps,

Andrew