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: 
NavinReddy
Creator II
Creator II

Time

Hi All,

Some one help me

current week Sunday- saturday using system time

  

thanks in advance,

rohith

2 Replies
NavinReddy
Creator II
Creator II
Author

Hi vishwa,

These two expression not working for me

thanks,

rohith

hic
Former Employee
Former Employee

If you want to define week numbers and week days using Sunday as the first day of the week, you have to write your own expressions.

One way to do it is the following

Load *,

          Dual(WeekDay(Date),Mod(WeekDay(Date-$(vFirstWeekdayOfWeek)),7)) as WeekDay,

          Ceil((Date-FirstDateOfWeekOne+1)/7) as WeekNumber,

          Date(WeekStart(Date-$(vFirstWeekdayOfWeek))+$(vFirstWeekdayOfWeek)) as WeekStart;

Load *,

          Date(

               WeekStart(YearStart(Date)+$(vMinDaysInWeek)-$(vFirstWeekdayOfWeek)-1)

               +$(vFirstWeekdayOfWeek)) as FirstDateOfWeekOne,

See more on http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/23/ancient-gods

HIC