Discussions

Expand all | Collapse all

Edit week length

  • 1.  Edit week length

    Posted 09-17-2018 16:09
    I have a field that calculates Week Of based on the date that someone enters for each record. I have set Sunday to be the displayed date for the Week Of field using the formula:

    PrevDayofWeek([Date], 0)

    The problem I'm running into is if someone enters a record in on Sunday, it relates it to the previous Sunday instead of the current Sunday. This example is what I'm getting:

    Date: 9/16/2018
    Week Of: 9/9/2018

    Week Of should be 9/16, not 9/9 but can't figure out how to change it to show the right Week Of?


  • 2.  RE: Edit week length

    Posted 09-17-2018 17:51
    Try this for the WeekOf formula

    If(DayOfWeek([Date])=0, [Date], PrevDayOfWeek([Date], 0))



  • 3.  RE: Edit week length

    Posted 09-17-2018 21:22
    Worked like a charm, thank you!