Discussions

Expand all | Collapse all

Show Date Range for One & Two Weeks Prior

  • 1.  Show Date Range for One & Two Weeks Prior

    Posted 08-17-2021 15:05
    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.  RE: Show Date Range for One & Two Weeks Prior

    Posted 08-17-2021 17:56
    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
    ------------------------------



  • 3.  RE: Show Date Range for One & Two Weeks Prior

    Posted 08-18-2021 09:21
    Once again... Thanks Mark!

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