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

Displaying data between 2 dates Introduced by User (URGENT PLEASE)

Hello,

I am still new to the world of BI and especially Etl Talend, I want to make a display of different data that is in my table between 2 dates that I specify as condition, and that it does not display all the data for all The dates using tMap, i tried to use DateDiff here my condition: TalendDate.diffDate (row4.declarele, '2017-07-20') <= 0 && TalendDate.diffDate (row4.resolule, '2017-07 -25 ')> = 0
But I have this message "Invalid Character Constant".

I do not know what method to use in order to have this data in return.

It's URGENT please.

Labels (2)
15 Replies
TRF
Champion II
Champion II

 Hi,

TalendDate.diffDate is expecting to receive 2 dates so you need:

 

TalendDate.diffDate(row4.declarele, TalendDate.parseDate("yyyy-MM-dd", "2017-07-20")) <= 0 &&
TalendDate.diffDate(row4.resolule, TalendDate.parseDate("yyyy-MM-dd", "2017-07-25")) >= 0

Hope this helps.

Anonymous
Not applicable
Author

It does not always work, I think it is not the right function 'diffDate' that can show me the data between the 2 dates. 

 

Another solution please ?!

TRF
Champion II
Champion II

It does.
TalendDate.diffDate gives you the number of days between 2 dates.
Share your tMap (with correction) and tell us what's the result you got (or compilation error if any).
Anonymous
Not applicable
Author

0683p000009LwFi.png0683p000009LwFx.png

Bluemoon
Creator
Creator

please open the code in workspace and you will see a red mark on the right side. click and check the error line and share it with us
Anonymous
Not applicable
Author

Yea, I use a different form of date but without any result 😕0683p000009LwG7.png

Bluemoon
Creator
Creator

date format is different from the data which you have given yyyy-MM-dd
Anonymous
Not applicable
Author

Always the same problem

 

0683p000009LwGM.png

Bluemoon
Creator
Creator

change 'dd-MM-yyyy' to 'yyyy-MM-dd' in designer -> open tMap editor ,
remember you can't change any code in code panel