Forum Discussion

HansHamm's avatar
HansHamm
Qrew Assistant Captain
3 years ago

Current Week in a query

What is the correct syntax for the current week in this query?
I have looked but cannot find it

var text THISWEEK ="{8.EX.'CURRENT WEEK'} AND {17.EX.'6'} AND {7.EX.'Regular Hours'};

------------------------------
Hans Hamm
------------------------------
  • The Quickbase Junkie has some great resources.  I was able to link though one of her documents to get to a Quickbase help[ page which led to this page

    https://helpv2.quickbase.com/hc/en-us/articles/4418302291860

    Operator Description

    this wk

    Starts at 12:00:00 a.m. on the first day of the current week and continues for seven days.

    XML example:

    <query>{7.IR.'this wk'}</query>

    URL example:

    https://target_domain/db/target_dbid?a=API_DoQuery&query={7.IR.'this+wk'}

    This example returns:

    All records where the date in fid 7 occurs within the time period that starts at 12:00:00 a.m. on the first day of the current week and continues for seven days.



    hence,  likely the syntax is 

    var text THISWEEK ="{8.IR.'this wk'} AND {17.EX.'6'} AND {7.EX.'Regular Hours'};


    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • HansHamm's avatar
      HansHamm
      Qrew Assistant Captain

      Mark I tried that originally and the error message came back as

      Please check the syntax of your formula. Look for mismatched parenthesis.... and the . after "IR" is highlighted in red



      ------------------------------
      Hans Hamm
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Please post (copy paste) your formula that fails the formula editor.

        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------