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

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download