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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
pawe84
Creator
Creator

tmap compare date syntax

Hi everyone,

I want to compare an invoice date for an agent in tmap and if the date is less then

'01.06.2022' then the field qualified will be zero.

IF AGENT_ID='SMITH' AND INV_DATE =< '01.06.2022'

THEN QUALIFIED=0

ELSE

QUALIFIED

Is this syntax correct?

row1.AGENT_ID.equals('SMITH') && (

TalendDate.compareDate(row1.INV_DATE,

TalendDate.parseDate("dd.MM.yyyy", "01.06.2022")) < 0 ? 0 : row1.

QUALIFIED

Thnaks for your advice.

Labels (2)
1 Solution

Accepted Solutions
ThWabi
Creator II
Creator II

Hello pawe84,

 

a) You opened a parenthesis after "&&", it needs a matching closing one at the end.

b) Within "equals", the Name SMITH needs to be in double quotation marks (not single ones), because it's a String in Java.

 

Best regards,

 

Thomas

 

View solution in original post

1 Reply
ThWabi
Creator II
Creator II

Hello pawe84,

 

a) You opened a parenthesis after "&&", it needs a matching closing one at the end.

b) Within "equals", the Name SMITH needs to be in double quotation marks (not single ones), because it's a String in Java.

 

Best regards,

 

Thomas