Six 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.
Date1Date2
1-Jan-20161-Jan-2016
1-Jan1-Jan
1-Jan1-Jan
  
2-Jan1-Jan
2-Jan1-Jan
2-Jan1-Jan
  
3-Jan2-Jan
3-Jan2-Jan
3-Jan2-Jan
  
4-Jan3-Jan
4-Jan3-Jan
4-Jan3-Jan
  
5-Jan4-Jan
5-Jan4-Jan
5-Jan4-Jan

 

 

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.

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