# How do I filter views based on business days?

0 out of 0 found this helpful
Have more questions? Submit a request

John McGarvey commented  ·

This is possible by using the DAYOFWEEK function. There may be other ways of doing it, but this is how I just tested with.

This function returns the number of the week (1-7) for a given date. The weeks starts with Sunday as "1".

"Test Date" is the name of your date field.
I used a calculated number field incase you need/want to count the number of records due on a given date - you can sum the 1's together.

if(dayofweek({Test Date})=1, 0,
if(dayofweek({Test Date})=2, 1,
if(dayofweek({Test Date})=3, 1,
if(dayofweek({Test Date})=4, 1,
if(dayofweek({Test Date})=5, 1,
if(dayofweek({Test Date})=6, 1,
if(dayofweek({Test Date})=7, 0,
0)))))))

HERE IS THE DESCRIPTION FROM THE DATE FUNCTION IN THE KNOWLEDGEBASE:
Returns the number (1-7) that corresponds to the day of the week for a date field. Sunday is assigned the value of 1.
Use in a Calculated Text or Calculated Number field.

When {Date} is June 15, 2017, dayofweek({Date}) returns 5 (Thursday).
Gives the same result as weekday().

Cristina commented  ·

Hi Paul.

Thank you for reaching out!

What John proposed is accurate. Depending on the specific scenario you are looking for, more logic might be needed in the calculation. If you would like a more customized response, send us the details of your question including the name of the App/Table/View to support@trackvia.com.

Regards,

Cristina