List all dates between two dates

Highlighted
Employee

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 

 

 


Accepted Solutions
Community Manager

Re: List all dates between two dates

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


All Replies
Community Manager

Re: List all dates between two dates

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

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Self-service Talend Migration: Moving from On-Premises to the Cloud

Move from On-Premises to the Cloud by following the advice of experts

Read Now

Best Practices for Using Context Variables with Talend – Part 3

Read about some useful Context Variable ideas

Blog

Talend Studio Improvements for API Services

Taken a look at the Talend Studio improvements for API Services

Watch Now