Date calculation for date -1

Eight Stars RAJ
Eight Stars

Date calculation for date -1

Hi Folks,

 

  • How to apply date -1 logic for Date1 column. i don't want to change first date(1-Jan).
  • I need to apply date -1 logic for second date(2-Jan) to upto i have date.
  • I need date -1 logic code. kindly share your information.
  • I need output below like table.
Date1 Date2
1-Jan-2016 1-Jan-2016
1-Jan 1-Jan
1-Jan 1-Jan
   
2-Jan 1-Jan
2-Jan 1-Jan
2-Jan 1-Jan
   
3-Jan 2-Jan
3-Jan 2-Jan
3-Jan 2-Jan
   
4-Jan 3-Jan
4-Jan 3-Jan
4-Jan 3-Jan
   
5-Jan 4-Jan
5-Jan 4-Jan
5-Jan 4-Jan

 

 

Thanks
RAJ
Five Stars tdz
Five Stars

Re: Date calculation for date -1

Hi,

 

I consider your column Date1 is of type "String".

A job like this (take a look at the attached document) can do what you want.

 

I hope this job helps you.

 

TD.

Fifteen Stars TRF
Fifteen Stars

Re: Date calculation for date -1

Hi,
Can you clarify your query.
What's the expected result based on your data sample?
What's the default year when not present in date2?
Should leap year be considered?

TRF

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.