Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
RAJ6
Contributor III
Contributor III

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

 

 

Labels (2)
2 Replies
Anonymous
Not applicable

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.


DateMinusOneOrNot.png
TRF
Champion II
Champion II

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?