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

List all dates between two dates

What would be the best way to output list all the dates between two dates, ideally without consuming java code or using tJava components etc. 

 

Such as :

 

TalendDate.getCurrentDate() - 100 days 

 

 

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Why would you not want to use Java? Sometimes it is entirely correct to use Java rather than look for a convoluted solution using multiple components. If you are happy using Talend Routines (TalendDate.getCurrentDate() is a Talend Java method), then maybe create your own Routine to handle this. Here is a good piece of code to base this on.....

http://www.java2s.com/Tutorials/Java/Data_Type_How_to/Date/Get_list_of_local_dates_between_two_java_...

 

I'm sure you can do this with Talend components and a lot less Java (Java will be involved), but it doesn't make any sense to have a "No Java" rule when it is the best course of action. You do have to be careful not to "reinvent the wheel" by writing Java when there are components which are built to do the job. In this case, you are not reinventing the wheel

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Why would you not want to use Java? Sometimes it is entirely correct to use Java rather than look for a convoluted solution using multiple components. If you are happy using Talend Routines (TalendDate.getCurrentDate() is a Talend Java method), then maybe create your own Routine to handle this. Here is a good piece of code to base this on.....

http://www.java2s.com/Tutorials/Java/Data_Type_How_to/Date/Get_list_of_local_dates_between_two_java_...

 

I'm sure you can do this with Talend components and a lot less Java (Java will be involved), but it doesn't make any sense to have a "No Java" rule when it is the best course of action. You do have to be careful not to "reinvent the wheel" by writing Java when there are components which are built to do the job. In this case, you are not reinventing the wheel