Networkdays Equivalent of Datatables editor

Networkdays Equivalent of Datatables editor

misteammisteam Posts: 50Questions: 18Answers: 0

Hi,

Is there an equivalent of network days in datatables? I need to get the data available with a where clause of 2 datediff( less weekend and holidays)

Hope you can help us, thank you in advance!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,685Questions: 1Answers: 10,498 Site admin

    Hi,

    I don't think I've heard the term "network days" before - reading about it for Excel, is it "net work days"?

    I don't believe SQL has such a function does it, or do you have a function for that already that you can use (i.e. if you were to just make a regular SQL query, how would you do it?).

    Allan

  • misteammisteam Posts: 50Questions: 18Answers: 0

    I want to add the highlighted codes:

    to here (see highlighted codes)

  • allanallan Posts: 63,685Questions: 1Answers: 10,498 Site admin

    OR WHERE 'transaction.id' is equal to some variable. What is that variable? Is it different for every row?

    Allan

  • misteammisteam Posts: 50Questions: 18Answers: 0

    Hi Sir @allan, yes it is different from every row. It was filtered using the for loop and function number_of_working_days.

    Thank you!

  • allanallan Posts: 63,685Questions: 1Answers: 10,498 Site admin
    Answer ✓

    There are two options then:

    1. You could use a VIEW which gets the data you want based on your own custom SQL.
    2. Collect the data you need to perform the calculation and do so with
      1. A server-side formatter, or
      2. A client-side formatter.

    Unfortunately it isn't possible to have our Editor server-side libraries perform a query per row (that wouldn't be very efficient anyway).

    Allan

Sign In or Register to comment.