0

Enddatum = Startdatum + x Arbeitstage

Hallo Ninox-Welt,

ich verzweifle... ich möchte mir eine Art Gantt mit versch. Aufgaben und Tätigkeiten erstellen. 

Leider scheitere ich schon daran, dass ich das Startdatum setzen will (Datumsfeld) und ich dann die kalkulierte Zeit der Tätigkeit (in Arbeitstagen als Zahl) eingebe und mir automatisch das Enddatum anzeigt, damit z.B. die nächste Tätigkeit angereiht werden kann... so ne Art Resourcen / Tätigkeitsplanung 

Also wie die Excel-Funktion ARBEITSTAG(Ausgangsdatum;Tage)

Ich hoffe es hat jemand eine Idee

5 Antworten

null
    • Ninox-Professional
    • planoxpro
    • vor 1 Jahr
    • Gemeldet - anzeigen

    Hallo Siegfried, ein einfacher Weg wäre folgende Formel:

    let myT := 0;
    let myD := Datum;
    while myT < Arbeitstage do
        myD := date(year(myD), month(myD), day(myD) + 1);
        if weekday(myD) < 5 then myT := myT + 1 end
    end;
    myD
    

    Berücksichtigt würden dabei nur die Wochentage Montag bis Freitag.

      • Rafael_Sanchis
      • vor 1 Jahr
      • Gemeldet - anzeigen

      esto

      A simple view with Planox Formula.  planox. pro I can create another table with Holidays days, I need to include this days in this formula.

      Thanks

      • Ninox-Professional
      • planoxpro
      • vor 1 Jahr
      • Gemeldet - anzeigen

      Rafael Sanchis If you have a table Holidays (called 'Feiertage' below) with dates (Datum), you can include this in the query:

      let myT := 0;
      let myD := Datum;
      while myT < Arbeitstage do
         myD := date(year(myD), month(myD), day(myD) + 1);
         if weekday(myD) < 5 then
            if cnt(select Feiertage where Datum = myD) < 1 then
               myT := myT + 1
            end
         end
      end;
      myD
      
      • Rafael_Sanchis
      • vor 1 Jahr
      • Gemeldet - anzeigen

      planox. pro Thanks  a lot Planox, appreciate your help.

    • siegfried_toews
    • vor 1 Jahr
    • Gemeldet - anzeigen

    WOW... ich bin begeistert... Danke das funktioniert. Mein Ansatz war tatsächlich auch mit einer while do schleife und den weekday <5 (weil Samstag) , aber habe es nicht hinbekommen... meine Programmier-Kenntnisse sind aus 2003 (C++) ansonsten muss ich mich an dieses scripting noch gewöhnen ;) 

    Danke Danke :) 

Content aside

  • Status Answered
  • vor 1 JahrZuletzt aktiv
  • 5Antworten
  • 119Ansichten
  • 3 Folge bereits