Seven Stars RAJ
Seven 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
2 REPLIES
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.

Forteen Stars TRF
Forteen 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