Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mosha231
Contributor II
Contributor II

Previous Week date

Hi all,

I am trying to get 7 days back date from system date in qlikview.  and then fetch year of that date.

example - Today is 1/01/2017  then i want  25/12/2016 date and in year it should show 2016

THANKS in ADVANCE!!

1 Solution

Accepted Solutions
PrashantSangle

Year((today()-7))

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

7 Replies
PrashantSangle

Year((today()-7))

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 🙂
PrashantSangle

Hi,

You can also use weekstart(today(),-1)

gives you previous weekstart.

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 🙂
mosha231
Contributor II
Contributor II
Author

Thanks for your quick reply.

For year it is working fine. but when i do (Today() - 7) am not getting required date format is coming up as different

PrashantSangle

use date(Today()-7,'YourDateFormat')

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 🙂
mosha231
Contributor II
Contributor II
Author

going forward on this. can you tell how i can join two outputs.

example year(today())  gives me 2017 and week(today()) gives me 48. i want output to be 201748

Thanks Allot

PrashantSangle

Hi,

year(today())&week(today())

or

use

WeekName(Today())    

navigate below URL to learn more date and time function

Date and time functions ‒ QlikView

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 🙂
raviteja475
Contributor
Contributor

Hi,

Have you got the answer can you please help me how to get present and previous week transactions

Thank you,

raviteja