Results 1 to 10 of 11

Thread: Week-day calculation

Hybrid View

  1. #1

    Smile Week-day calculation

    I am working with some date values, open_date and closed_date. I am using dateSubtract to get a number of days between the dates, but I really need to exclude weekend days from my output. I know there must be a way to do that, but I can't figure it out. Help!

    Cindy Clark

  2. #2
    Lavastorm Employee gmullin's Avatar
    Join Date
    May 2014
    Location
    Chicago
    Posts
    185

    Default

    The function weekday() will tell you the day of the week a date falls on. 0 is Sunday and 6 is Saturday, then everything else in between.

  3. #3

    Default

    Right, but I am only getting 2 dates, open and closed--they are always a weekday. I can't really figure out how to incorporate the weekday function to reduce my calculation if a day is Sat or Sun.

  4. #4
    Lavastorm Employee gmullin's Avatar
    Join Date
    May 2014
    Location
    Chicago
    Posts
    185

    Default

    How about something like this graph? You can have an open and close date, and then the Filter will count the number of weekend days and weekday days there was between those 2 dates.

    weekdays.brg

  5. #5
    Lavastorm Employee
    Join Date
    Nov 2012
    Location
    Warrington, UK
    Posts
    244

    Default

    Hi Cindy,

    you could also use the Calculate Workdays node. The node provides the number of working days between the specified StartDate and EndDate values.

    Calculate_Workdays.brg

    In addition to providing a count of the total number of workdays, the node can be configured to exclude Public Holidays and/or an individual's vacation days that fall between the StartDate and EndDate values.

    An example of using Public Holidays in the calculation can be found in the following forum post:

    http://community.lavastorm.com/threa...n-in-LAE-graph

    Regards,
    Adrian

  6. #6

    Default

    Perfect! Thank you for the quick responses!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •