Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Find specific dates in the past

Hi all,

Just a quick one about dates. Has anyone ever dealt with finding weekly dates automatically? I am looking to save in a variable last Friday's date for example.

Thanks

Tags (1)
1 Solution

Accepted Solutions
kiranmanoharrode
Not applicable

Re: Find specific dates in the past

use this expression,

It will give u last Friday's Date

=if(WeekDay(Today())='Mon',Date(Today()-3),

if(WeekDay(Today())='Tue',Date(Today()-4),

if(WeekDay(Today())='Wed',Date(Today()-5),

if(WeekDay(Today())='Thu',Date(Today()-6),

if(WeekDay(Today())='Fri',Date(Today()-7),

if(WeekDay(Today())='Sat',Date(Today()-8),

if(WeekDay(Today())='Sun',Date(Today()-9))))))))

3 Replies
kiranmanoharrode
Not applicable

Re: Find specific dates in the past

use this expression,

It will give u last Friday's Date

=if(WeekDay(Today())='Mon',Date(Today()-3),

if(WeekDay(Today())='Tue',Date(Today()-4),

if(WeekDay(Today())='Wed',Date(Today()-5),

if(WeekDay(Today())='Thu',Date(Today()-6),

if(WeekDay(Today())='Fri',Date(Today()-7),

if(WeekDay(Today())='Sat',Date(Today()-8),

if(WeekDay(Today())='Sun',Date(Today()-9))))))))

Not applicable

Re: Find specific dates in the past

Thanks I wrote something similar myself but rushed to also ask

kiranmanoharrode
Not applicable

Re: Find specific dates in the past

Welcome Joseph...........