Forum Discussion

DanielJohnson2's avatar
DanielJohnson2
Qrew Trainee
3 years ago

Show Date Range for One & Two Weeks Prior

Hi All,

I'm trying to make a rich text field that helps the user remember which dates to enter data for in the subsequent field. We have a field for two weeks prior, and one week prior. So, if the user is entering data today, 8/17/21, then the two week prior formula field should display 08/01/21-08/07/21, and the one week prior formula field should display 08/08/21-08/14/21.

So far I've only been able to get the start of this week with ToText(FirstDayOfWeek(Today())). It won't let me subtract 14 from Today().

Thoughts?

------------------------------
Daniel Johnson
------------------------------

2 Replies

  • to do date math you need to use duration units, such as seconds, minutes, hours or days.

    ToText(FirstDayOfWeek(Today() - Days(14)))

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • DanielJohnson2's avatar
      DanielJohnson2
      Qrew Trainee
      Once again... Thanks Mark!

      ------------------------------
      Daniel Johnson
      ------------------------------