Forum Discussion

BenjaminBrooks's avatar
BenjaminBrooks
Qrew Trainee
5 years ago

Date Formula

Hello,

I have the current formula that works correctly but it needs a slight adjustment:
FirstDayOfMonth(AdjustMonth([Date Sold],1))

It brings back the first of the next month which is exactly what i want for 9 months out of the year for the months that the date sold is 01/xx/xxxx, or 02/xx/xxxx, 03/xx/xxxx, 04/xx/xxxx, 05/xx/xxxx, 06/xx/xxxx, 07/xx/xxxx, 08/xx/xxxx, 09/xx/xxxx

but when the date sold is 10/xx/xxxx, 11/xx/xxxx, 12/xx/xxxx i would like it to show 01/01/2021 (the upcoming year) how would i do this?

------------------------------
Benjamin Brooks
------------------------------
  • try this
    var number NumMonthsToAdjust  =
    IF(
    Month([Date Sold]) <=9,1,
    Month([Date Sold]) =10,3,
    Month([Date Sold]) =11,2,
    Month([Date Sold]) =12,1);

    FirstDayOfMonth(AdjustMonth([Date Sold],$NumMonthsToAdjust))


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • BenjaminBrooks's avatar
      BenjaminBrooks
      Qrew Trainee
      Doesn't like the 1 after the 9 says expecting date but found number!

      ------------------------------
      Benjamin Brooks
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Can you post the formula and the error message?

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