How to count sunday monday in two date range

how to count sunday monday in two date range…

i have project, i want to know how many day in a fix date range and fil it seprate text box

like
monday 4
tuesday 4
wednessday 5
thursaday 5
friday 5
saturday 4
sunday 4

can you help me with example

I am half a way crossed… Soon i will try to complete it…
Working fine, but certain rules need to be add…

Taifun

Yes, @ajay_kapil , found final solution, bugs removed… if you input just dates (MM/DD/YYYY format) immediately it will display,

  1. Totally How many days are there…
  2. How many weekdays(Sunday,Monday, etc. ) are there and all…

Afternoon I will share… now I am going to take class. So little bit busy

If you are, @ajay_kapil , interested, pls reply in this forum, let me share the blocks. If you found it mean share your blocks with us .

@ajay_kapil , here is the apk, try and tell me. If you are active in forum you will get resolution soon…

Gowrisankar_work.apk (6.2 MB)

And the blocks used for this work:

Output in app:

1 Like

can you share your aia

why need aia always just look at the blocks and do it

and @Still-learning pls show what you did in those functions

i know you are expert…
but im not…

and im try this but its not proper work

i want to also learn this, so i say aia

sure…
here is the block, uploading

but in aia also it show blocks only

This is the rule i used.

  1. First i count the number of days between the given dates.
  2. And i sorted the week days according to the Day of the first text box. (then only i can go smooth with the rule)
  3. And divides the total value by 7. It gives how many week days are there,
  4. Then i used division remainder block to count the remaining.

For example, If the Text box1.text day Monday and total count is 7 mean no problem( all the weekdays count will be 1). But If the total value is 10 mean, then from the starting day i have to add one more counting to first three weekdays. i.e Monday-2. Tuesday2, Wed3, thu-1, fri-1, sat-1 and sun-1.(and i achieved this using 7 procedures- more info please see the block)

Because of this reason i am very much concerned with the first day. Also we no need to consider whether the year is leap or not and all. Because everything will come under counting.

So for i didnt find any bug. Experts if find anything please tell me…

Thank you @ajay_kapil , though your idea is simple but it makes me to work a lot… This work may be easy for the experts but i tried of my own.

Like this i used the procedures…

And this is the compiling blocks which completes the work…

I hope you can understand my design somewhat… Sorry , i am unable to make all of you to understand it easily…

1 Like

if the remainder is 5, then i used this procedure…

1 Like