cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lha Regular Visitor
Regular Visitor

Calculating the number of days in week that have passed

Hello All,

 

I am trying to find a formula that will tell me how many days in the week have passed.

 

For example:

 

Week is Sunday to Saturday

 

Today is Tuesday

 

I need a formula that will returnt the number 2 (for two days have passed).

 

Thank you!

2 ACCEPTED SOLUTIONS

Accepted Solutions
lha Regular Visitor
Regular Visitor

Re: Calculating the number of days in week that have passed

Nevermind, I figured this out.

 

Thanks!

lha Regular Visitor
Regular Visitor

Re: Calculating the number of days in week that have passed

This is probably the most complicated way of doing this but here it is how I determined how many days have passed:

 

Var

CurrentDate = Today()

Return

 

WEEKDAY(CurrentDate)-1

 

This gave me a numerical value in which I used to calculate the average daily production quantity by taking week to date production quanity and dividing it by the days that have passed.

 

I've had issues with refreshes on our company's internal report server when I only use the 2nd half of that formula so I've started to establish the current date using the Var code and haven't had issues since. 

 

3 REPLIES 3
lha Regular Visitor
Regular Visitor

Re: Calculating the number of days in week that have passed

Nevermind, I figured this out.

 

Thanks!

Super User
Super User

Re: Calculating the number of days in week that have passed

Please post solution if you are able, someone else might have this question. I can think of a few ways of doing this.


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


lha Regular Visitor
Regular Visitor

Re: Calculating the number of days in week that have passed

This is probably the most complicated way of doing this but here it is how I determined how many days have passed:

 

Var

CurrentDate = Today()

Return

 

WEEKDAY(CurrentDate)-1

 

This gave me a numerical value in which I used to calculate the average daily production quantity by taking week to date production quanity and dividing it by the days that have passed.

 

I've had issues with refreshes on our company's internal report server when I only use the 2nd half of that formula so I've started to establish the current date using the Var code and haven't had issues since.