4 Replies Latest reply: Jul 13, 2012 11:47 AM by Rahul Lakhina RSS

    Week Start Day

      Hi All,

       

      This might be a basic QV question, but figured I'd throw it out there.  Our QV is set so that Weeks start on a Monday.  Traditionally our reporting for other systems, our week starts on Sunday.  Does anyone know how I can change the QV default so that "vThisWeek" always starts on Sunday instead of Monday?

       

      Thanks!

        • Re: Week Start Day
          Stefan Wühl

          Some -- but not all -- QV date functions take as third optional argument a week (start) offset, like

           

          weekstart(today(),0,-1)

           

          should return last sunday's date.

            • Re: Week Start Day
              Rahul Lakhina

              However if you are trying to create a week number filed in your script you might want to try the following syntax:   Week(weekstart(Date,0,-1))  Where   Date is your date field  Regards  Rahul

                • Re: Week Start Day
                  Stefan Wühl

                  Rahul,

                   

                  I think your created week number would be one off compared to WeekName(Date,0,-1).

                   

                  As there are many different ways to define week numbering, I am not saying you're wrong, just want to express that we need to take care for the different way possible.

                  Since Meghan wants a week start on Sunday, I assume she also wants a week numbering different from the one based on ISO week numbering that week() or weekname() returns.