Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

get 10 days back date from current and place into where clause of salesforce field

i have extracted data from sales force

my issue is

1) in qlikview I want to get ten days back date from current date

how to do this ?

2) after extracting that date I want to place that date in sales force fields like this

(Salesforce field ) lastmodifieddate  >=  QlikviewLasttenDaysdate;

how to make this task

Need help

Thanks in advance

9 Replies
Anonymous
Not applicable
Author

Hi,

Define a variable as

vLastTenDays= max(date)-10

Use this variable in the sales force field as

lastmodifieddate  >=  $(vLastTenDays)

Regards,

Greeshma

Gysbert_Wassenaar

LET QlikviewLasttenDaysdate = num(today()-10);

....

(Salesforce field ) lastmodifieddate  >=  $(QlikviewLasttenDaysdate);


talk is cheap, supply exceeds demand
buzzy996
Master II
Master II

try tis,in ur where clause load statment..

where ur datefield>=Num(Date(now(),'DD/MM/YYYY'))-10;

Not applicable
Author

by following this code

LET QlikviewLasttenDaysdate = num(today()-10);

....

(Salesforce field ) lastmodifieddate  >=  $(QlikviewLasttenDaysdate);

its giving me this error

where LastModifiedDate >= 42120

      ^

ERROR at Row:24:Column:7

value of filter criterion for field 'LastModifiedDate' must be of type dateTime and should not be enclosed in quotes

Not applicable
Author


by following your code

having this error

where LastModifiedDate >=  Num(Date(now(),'DD/MM/YYYY'))-10

                          ^

ERROR at Row:24:Column:27

Bind variables only allowed in Apex code

buzzy996
Master II
Master II

try this first,

LastModifiedDate >= Date(Num(Date(Now(),'DD/MM/YYYY')-10),'DD/MM/YYYY')

else try this

LastModifiedDate >==Date#(Num(Date(Now(),'DD/MM/YYYY')-10),'DD/MM/YYYY')

Not applicable
Author

ist code this error

where LastModifiedDate >= Date(Num(Date(Now(),'DD/MM/YYYY')-10)

                         ^

ERROR at Row:24:Column:26

Bind variables only allowed in Apex code

sec code this error

where LastModifiedDate >=Date#(Num(Date(Now(),'DD/MM/YYYY')-10)

                        ^

ERROR at Row:24:Column:25

Bind variables only allowed in Apex code

Not applicable
Author

my whole code

ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='$#,##0.00;($#,##0.00)';

SET TimeFormat='h:mm:ss TT';

SET DateFormat='M/D/YYYY';

SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

let start_datenum(today()-10);

let dd = date(date#(20150426,'YYYYMMDD'),'MM/DD/YYYY');

SQL SELECT Id,

    LastModifiedDate,

    Med_Rep_Active__c,

FROM Target__c

where LastModifiedDate >=Date#(Num(Date(Now(),'DD/MM/YYYY')-10),'DD/MM/YYYY');

buzzy996
Master II
Master II

see attached sample,