Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vijayit43
Creator
Creator

Previous Date From Given Date

if i have select from date '15 aug 2014' and to date'25 Aug 2014' then days diff 10 i want to previous 10 days date from 15 Augest(5 Aug 2014) how to do that Please help.

1 Solution

Accepted Solutions
PrashantSangle

Hi,

Create One Variable

varDaysDiff

Expression=

Interval(to_date-star_date,'D')

Then use that variable whereever you want that difference

Like if you want to show in text objec

Then write expression like

=Date(start_date-varDaysDiff)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

4 Replies
ajaykumar1
Creator III
Creator III

Hi,

Try like ;

Load * inline

[period

08/11/2014

];

text object :date((date(period)-10)) and output is 8/1/2014

Regards,

Ajay

PrashantSangle

Hi,

Create One Variable

varDaysDiff

Expression=

Interval(to_date-star_date,'D')

Then use that variable whereever you want that difference

Like if you want to show in text objec

Then write expression like

=Date(start_date-varDaysDiff)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
muniyandi
Creator III
Creator III

Hi Vijay,

Try this expression:

Variable1 = First Date (15/Aug/2014)

Variable2 = Last Date (25/Aug/2014)

Variable3 = Date(Varaiable1-(Varaiable2 -Varaiable1 ) )

Thanks,

Muni

Not applicable

Add a extra field in the script which will store Numeric value corresponding to date.

And then use that field to go to and fro in dates..

Thanks,

Singh