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: 
Anonymous
Not applicable

help on weekstart

Hi all,

i have below code

let vstart = '01/07/2015';

let vend = '31/07/2015';

i have to find the weekstart for these dates

i tried with below script on text boxes but it'not giving correct results

=weekstart(vstart)--- giving same start date .

Thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Try this:

let vstart = date#('01/07/2015', 'DD/MM/YYYY');

let vend = date#('31/07/2015';'DD/MM/YYYY');

View solution in original post

6 Replies
Anonymous
Not applicable
Author

Try this:

let vstart = date#('01/07/2015', 'DD/MM/YYYY');

let vend = date#('31/07/2015';'DD/MM/YYYY');

sunny_talwar

or may be this:

=WeekStart(Date#($(vstart), 'DD/MM/YYYY'))

Bill_Britt
Former Employee
Former Employee

Here is a sample. The value let vstart = date#('01/07/2015', 'DD/MM/YYYY'); posted above will give you an incorrect date.

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
Anonymous
Not applicable
Author

Hi Bill ,

The correct syntax is

=WeekStart(Date#(vend,'DD/MM/YYYY'))

Thanks

Bill_Britt
Former Employee
Former Employee

HI,

The let vend = date#('31/07/2015';'DD/MM/YYYY');  did work, but the let vstart = date#('01/07/2015', 'DD/MM/YYYY'); didn't.

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
Anonymous
Not applicable
Author

This will also works

=WeekStart(Date#(vstart,'DD/MM/YYYY'));