2 Replies Latest reply on Nov 27, 2015 2:00 PM by isamudysan

    calculations for days of week


      i'm currently working on a attendance solution for my work place.  one of the criteria for this solution is to have a drop down calendar, which when the date is selected will auto populate the day names of the week as well as the dates for that week.  the starting day, or day 1, is sunday. so, on any given day when a record is created/or selected, the day 1 field should always be sunday of that work week. the date field type is 'Date'.


      what i currently have is below (with calculations):


      and calculations are as follows:


      the fields Day1Date (and so forth) has the calculation of Date - 1, Date - 2, etc., etc.


      any help and assistance is greatly appreciated. thank you in advance.

        • 1. Re: calculations for days of week

          I'm not positive that I understand which part you're having trouble with, but...


          dateField - dayofweek ( dateField ) + 1 will return the Sunday of the week in which dateField falls. If you calculate Day1Date this way, then Day2Date would be Day1Date + 1


          If your cDay1, etc. fields are just for display, you could just show the date fields of Day1Date, etc., and format them to only show the day of week.


          Does this help?


          Chris Cain


          1 of 1 people found this helpful
          • 2. Re: calculations for days of week

            a very big THANK YOU!!! and, i thought that it was gonna be a more complex calculation...LOL. this definitely is what i'm looking for. you've made my day. still a novice at this so i definitely appreciate and thankful your help.