Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

smilingjohn
Contributor III

Week Date

Hi All, 

Please find the attachment of the QVW file. 

 

My requirement is to show weekly date from created field . Can you please help in achieving this ..the start of the week should be from Sunday to Saturday and it should look like as shown in the scrceenshot.

Weekly Report.PNG

Thanks In Advance 

 

3 Replies
mdmukramali
Valued Contributor III

Re: Week Date

Hi,

In the Script can you change the default settings :

 

Hi,

In the Script can you change the default setting for the week.

SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;($#,##0.00)';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET FirstWeekDay=6;

 

and use the Weekstart function to get the first day of the week ( which is Sunday).

WeekStart(Date#(Created,'DD-MM-YYYY hh.mm.ss')) as Week

 

Thanks,

Mohammed Mukram

smilingjohn
Contributor III

Re: Week Date

Hi Mohammad,

Thanks for the solution , can i know how is the "SET FirstWeekDay=6;   working ? how is it considering from Sunday to Saturday ?

It will be really helpful if you can please explain me this . 

 

Thanks 

Highlighted
mdmukramali
Valued Contributor III

Re: Week Date

Hi smilingjohn,

By default, QlikView functions use Monday as the first day of the week. The following values can be used:

  • 0 (= Monday)
  • 1 (= Tuesday)
  • 2 (= Wednesday)
  • 3 (= Thursday)
  • 4 (= Friday)
  • 5 (= Saturday)
  • 6 (= Sunday)

Examples:  

Set FirstWeekDay=6; //(set Sunday as the first day of the week)

 

Thanks,

Mohammed Mukram