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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Compare one date with another specific date in Tmap

Hi,

 

I need to compare one date with 5/1/2018 so I create two local variables and then use compareDate but it doesn't work -  V2 can not be resolved as a variable.

Please advise me. Thank you!

 

V1:      TalendDate.parseDate("MM/dd/yyyy",row1.ETD) 

V2:      TalendDate.parseDate("MM/dd/yyyy","05-01-2018") 

 

Output:    V1.compareDate(V2)>=0

 

Labels (2)
8 Replies
TRF
Champion II
Champion II

vboppudi
Partner - Creator III
Partner - Creator III

If you created variables in tMap then you have to refer variable with prefix Var.V1 or Var.V2.

Var.V1.compareDate(Var.V2)>=0

Regards,

Anonymous
Not applicable
Author

Hi,

 

Thanks for your advise.

After I added Var. I still got error which showed "The method compareDate(Date) is undefined for the type date". I checked I changed data type to "Date" for variables

vboppudi
Partner - Creator III
Partner - Creator III

is it possible to provide screen shot of job and tMap configuration?

 

Regards,

Anonymous
Not applicable
Author

0683p000009LyE9.png

0683p000009Lync.png

Please see above

vboppudi
Partner - Creator III
Partner - Creator III

try this TalendDate.compareDate(Var.ETDate,Var.D0501)>=0

 

Regards,

Anonymous
Not applicable
Author

After I run with "TalendDate.compareDate(Var.ETDate,Var.D0501)>=0" I got below error info -
0683p000009Lynh.png