Discussions

Expand all | Collapse all

How could I filter all records on Weekend days (Sat and Sun only)?

  • 1.  How could I filter all records on Weekend days (Sat and Sun only)?

    Posted 02-07-2018 20:48
    I need to filter a report of ours to only show records created ON all Saturdays or Sundays of the month.  How do I go about this?

    Thanks!


  • 2.  RE: How could I filter all records on Weekend days (Sat and Sun only)?

    Posted 02-07-2018 21:05
    no problem

    Make a formula checkbox field called [Record was created on a weekend?]

    DayOfWeek(ToDate([Date Created])) = 6 // Saturday
    or
    DayOfWeek(ToDate([Date Created])) = 0 // Sunday



    Then you can make a report to filter on that field.

    The Day of Week function returns the day number of the week and Sunday is day zero.  Monday is day 1.  etc.


  • 3.  RE: How could I filter all records on Weekend days (Sat and Sun only)?

    Posted 02-07-2018 22:26
    Awesome!  I will give this a test and report back it if works or explodes.


  • 4.  RE: How could I filter all records on Weekend days (Sat and Sun only)?

    Posted 02-07-2018 22:48
    Hm, are you saying to created a calculated column?


  • 5.  RE: How could I filter all records on Weekend days (Sat and Sun only)?

    Posted 02-08-2018 05:52
    I suggest making an actual formula checkbox field. Then use that field as a filter in the report.


  • 6.  RE: How could I filter all records on Weekend days (Sat and Sun only)?

    Posted 02-08-2018 15:37
    So I was able to get what I needed but via a different method somewhat.  I tried using the code provided above but it would always error off when I put in our column name.

    I ended up having a calculated column that shows the number of the day, and then told the report to only show 0 or 6

    :)