Forum Discussion

TysonHayes's avatar
TysonHayes
Qrew Member
4 years ago

1-1-1970 Paydays

Hello, trying to populate paydays and using the following formula but its returning 1-1-1970 no matter how I rework it.  Was trying to work through pay periods of the 1st through the 15th is paid on the 25th and the 16th to end of month on the 10th of the next.  The simpler part, for me, is that all the approvals are put in just before those pay dates so just trying to shortcut that anything approved before the 10th pays on the 10th and anything after, on the 25th.  I appreciate any assistance on this.

var number DayOfMonth = Day([Pay Approved]);
var number MM = Month([Pay Approved]);
var number YYYY = Year([Pay Approved]);

ToDate($MM & If($DayOfMonth <10,10,25) & $YYYY)

------------------------------
Tyson Hayes
------------------------------

3 Replies

  • Instead of ToDate, try just using Date and see if that works for you

    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quick Base Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------
    • TysonHayes's avatar
      TysonHayes
      Qrew Member
      Nope, got "Expecting number but found text" syntax error

      ------------------------------
      Tyson Hayes
      ------------------------------
  • try this
    var number DayOfMonth = Day([Pay Approved]);

    var number MM = Month([Pay Approved]);
    var number YYYY = Year([Pay Approved]);

    Date($YYYY, $MM & If($DayOfMonth <10,10,25) & $DayOfMonth)

    Here is the syntax help.  its YYYY, MM, DD syntax
    https://login.quickbase.com/db/6ewwzuuj?a=dr&r=7&rl=wc



    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------