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: 
Karim_Khan
Creator III
Creator III

Last day of week is not getting captured

Hi Team,

    I am using weekend(Date) function to get the last day of week but it is not getting captured it is showing wrong date.

PFA

kush141087bill.markhamsureshqv@sureshqvQlikView Forums & Resources

KK
1 Solution

Accepted Solutions
sunny_talwar

Try this:

SET FirstWeekDay=0;

LOAD *,

          WeekEnd(DateField, 0, 0) as CreatedWeendend


Look here for a similar requirement -> Creating a week field based on system date?

View solution in original post

8 Replies
sunny_talwar

Try this:

SET FirstWeekDay=0;

LOAD *,

          WeekEnd(DateField, 0, 0) as CreatedWeendend


Look here for a similar requirement -> Creating a week field based on system date?

Karim_Khan
Creator III
Creator III
Author

it is showing the same result

KK
sunny_talwar

My bad, try this:

Table:

LOAD *,

  WeekEnd(DATE_DT, 0, 6) as WeekEndDate;

LOAD * Inline [

DATE_DT

1-Jan-00

1-Jan-02

1-Jan-05

];

sunny_talwar

Or this

SET FirstWeekDay=6;

Table:

LOAD *,

  WeekEnd(DATE_DT) as WeekEndDate;

LOAD * Inline [

DATE_DT

1-Jan-00

1-Jan-02

1-Jan-05

];

Karim_Khan
Creator III
Creator III
Author

No worry bro i got the solution from ur Idea only

SET FirstWeekDay=1;

Table:

LOAD *,

  WeekEnd(DATE,0,-1) as WeekEndDate;


Thank u so much for helping always

KK
Kushal_Chawda

try this

WeekEnd(YourDate, 0, 6) as WeekEndDate

sunny_talwar

Ya it always come down to playing around with the arguments within WeekEnd function (3rd argument). I am glad you were able to figure it out.

Best,

Sunny

Kushal_Chawda

that's gr8