Discussions

 View Only
  • 1.  Add 3 months to date but not land on a weekend

    Posted 07-27-2022 15:32
    Any thoughts of how to add 3 months to a date, but if it lands on a saturday or sunday, bounce forward to the monday, or bounce back to the friday?

    My initial thought is to add the 3 months, check DayofWeek, then add or subtract a day if needed. Is there a better way?

    ------------------------------
    Mike Tamoush
    ------------------------------


  • 2.  RE: Add 3 months to date but not land on a weekend
    Best Answer

    Posted 07-27-2022 16:02
    np,

    https://login.quickbase.com/db/6ewwzuuj?a=dr&rid=153&rl=csi

    WeekdayN(AdjustMonth([my date],3))

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



  • 3.  RE: Add 3 months to date but not land on a weekend

    Posted 07-27-2022 16:23
    Edited by Mike Tamoush 07-27-2022 16:27
    Thanks! I searched the function list but just missed that one! It's ToWeekDayN but your link showed it!

    ------------------------------
    Mike Tamoush
    ------------------------------



  • 4.  RE: Add 3 months to date but not land on a weekend

    Posted 07-27-2022 16:24
    Now, bonus points if you know how to do that in a Pipeline using Jinja :)

    For now, I'm making the field and using the field. I think the Jinja might be a bit ambitious!

    ------------------------------
    Mike Tamoush
    ------------------------------