Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Abstand zwischen 2 Daten berechnen

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    11
    1
    74

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    11
    1
    554

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    24
    1
    1.7k

Abstand zwischen 2 Daten berechnen

Geplant Angeheftet Gesperrt Verschoben Skripten / Logik
7 Beiträge 4 Kommentatoren 686 Aufrufe 3 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • S Offline
    S Offline
    Sneaker75
    schrieb am zuletzt editiert von
    #1

    Hallo.

    Ich möchte gerne die Anzahl der Tage zwischen 2 Tagen berechnen. In einem Datenpunkt steht ein Datum/Uhrzeit und ich möchte 1x täglich die Tagesdifferenz zwischen diesem Datenpunkt und jetzt in einen anderen Datenpunkt schreiben.

    Also Datenpunkt1: 18.2.2022 17:10
    Heute: 20.2.1022 06:00
    Datenpunkt2 berechnet: 2

    Wie mache ich das am besten? Hat vielleicht jemand eine fertige Lösung?

    CinimodC paul53P 2 Antworten Letzte Antwort
    1
    • S Sneaker75

      Hallo.

      Ich möchte gerne die Anzahl der Tage zwischen 2 Tagen berechnen. In einem Datenpunkt steht ein Datum/Uhrzeit und ich möchte 1x täglich die Tagesdifferenz zwischen diesem Datenpunkt und jetzt in einen anderen Datenpunkt schreiben.

      Also Datenpunkt1: 18.2.2022 17:10
      Heute: 20.2.1022 06:00
      Datenpunkt2 berechnet: 2

      Wie mache ich das am besten? Hat vielleicht jemand eine fertige Lösung?

      CinimodC Offline
      CinimodC Offline
      Cinimod
      Most Active
      schrieb am zuletzt editiert von Cinimod
      #2

      @sneaker75

      Das Prinzip ist dieses:

      Bildschirmfoto 2022-02-20 um 21.21.39.png

      Synology DS918+, Fritzbox 6690 Cable, #Docker #Blockly #Vis2 #Deconz #Tasmota

      S 1 Antwort Letzte Antwort
      0
      • CinimodC Cinimod

        @sneaker75

        Das Prinzip ist dieses:

        Bildschirmfoto 2022-02-20 um 21.21.39.png

        S Offline
        S Offline
        Sneaker75
        schrieb am zuletzt editiert von Sneaker75
        #3

        @cinimod Vielen Dank für die Hilfe.

        Leider wirft er mir (null) raus. Kannst Du nochmal drüberschauen?

        Wert Datenpunkt "Austausch_Nitrax" (Typ string): 2022-02-01 10:00:00
        Wert Datenpunkt "Tage_Austausch_Nitrax" (Typ number): (null)

        40e245c2-44a0-432c-81e6-6eddba1e8068-grafik.png

        AsgothianA 1 Antwort Letzte Antwort
        0
        • S Sneaker75

          @cinimod Vielen Dank für die Hilfe.

          Leider wirft er mir (null) raus. Kannst Du nochmal drüberschauen?

          Wert Datenpunkt "Austausch_Nitrax" (Typ string): 2022-02-01 10:00:00
          Wert Datenpunkt "Tage_Austausch_Nitrax" (Typ number): (null)

          40e245c2-44a0-432c-81e6-6eddba1e8068-grafik.png

          AsgothianA Offline
          AsgothianA Offline
          Asgothian
          Developer
          schrieb am zuletzt editiert von
          #4

          @sneaker75
          Du musst den wert von Objekt ID Austausch Nitrax noch in ein Datum-Objekt umrechnen. Schau mal bei den Umrechnungsblöcken nach, da sollte es einen geeigneten geben.

          A.

          ioBroker auf RPi4 - Hardware soweit wie möglich via Zigbee.
          "Shit don't work" ist keine Fehlermeldung, sondern ein Fluch.

          CinimodC 1 Antwort Letzte Antwort
          0
          • AsgothianA Asgothian

            @sneaker75
            Du musst den wert von Objekt ID Austausch Nitrax noch in ein Datum-Objekt umrechnen. Schau mal bei den Umrechnungsblöcken nach, da sollte es einen geeigneten geben.

            A.

            CinimodC Offline
            CinimodC Offline
            Cinimod
            Most Active
            schrieb am zuletzt editiert von Cinimod
            #5

            @Sneaker75

            Ah ja mein Fehler, ich hatte zum ausprobieren "Zeitstempel von Objekt ID" genommen, damit hat es auch so funktioniert.

            Dann versuch es so, mit einem Konvertieren Block:

            Bildschirmfoto 2022-02-21 um 07.32.03.png

            Synology DS918+, Fritzbox 6690 Cable, #Docker #Blockly #Vis2 #Deconz #Tasmota

            1 Antwort Letzte Antwort
            0
            • S Sneaker75

              Hallo.

              Ich möchte gerne die Anzahl der Tage zwischen 2 Tagen berechnen. In einem Datenpunkt steht ein Datum/Uhrzeit und ich möchte 1x täglich die Tagesdifferenz zwischen diesem Datenpunkt und jetzt in einen anderen Datenpunkt schreiben.

              Also Datenpunkt1: 18.2.2022 17:10
              Heute: 20.2.1022 06:00
              Datenpunkt2 berechnet: 2

              Wie mache ich das am besten? Hat vielleicht jemand eine fertige Lösung?

              paul53P Offline
              paul53P Offline
              paul53
              schrieb am zuletzt editiert von paul53
              #6

              @sneaker75 sagte: Datenpunkt1: 18.2.2022 17:10

              Dieses Datumsformat kann nicht so einfach konvertiert werden. Es muss erst einmal umsortiert werden.

              Blockly_temp.JPG

              <xml xmlns="https://developers.google.com/blockly/xml">
               <variables>
                 <variable id="*[oLSpH(xMVC{;rLFF7B">datum</variable>
               </variables>
               <block type="schedule" id="p0rX5zxq4YhKxy]m(?Ld" x="87" y="37">
                 <field name="SCHEDULE">0 5 * * *</field>
                 <statement name="STATEMENT">
                   <block type="variables_set" id="V+R[6xi[r:@!*U=S;BB{">
                     <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                     <value name="VALUE">
                       <block type="lists_split" id="c#,yC/u_VXaouN*SamI`">
                         <mutation mode="SPLIT"></mutation>
                         <field name="MODE">SPLIT</field>
                         <value name="INPUT">
                           <block type="get_value" id="LvsWD9lw7QVO.ss*;Bah">
                             <field name="ATTR">val</field>
                             <field name="OID">ID auswählen</field>
                           </block>
                         </value>
                         <value name="DELIM">
                           <shadow type="text" id="bhxtu2Na|y(!);[OKw@?">
                             <field name="TEXT"> </field>
                           </shadow>
                         </value>
                       </block>
                     </value>
                     <next>
                       <block type="variables_set" id="01MZ]uZc`bvD-`QXYCjd">
                         <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                         <value name="VALUE">
                           <block type="lists_getIndex" id="h#-IoL#S$~%z].,Ue;pg">
                             <mutation statement="false" at="true"></mutation>
                             <field name="MODE">GET</field>
                             <field name="WHERE">FROM_START</field>
                             <value name="VALUE">
                               <block type="variables_get" id="5q0mzP?2$={z{Tx}R7%.">
                                 <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                               </block>
                             </value>
                             <value name="AT">
                               <block type="math_number" id="NM6pi^5^D5-:]YfLltp(">
                                 <field name="NUM">1</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <next>
                           <block type="variables_set" id="Z.6msibzgcm[5ds0!_tD">
                             <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                             <value name="VALUE">
                               <block type="lists_split" id="up2*39*3N,b*zP_r+BJF">
                                 <mutation mode="SPLIT"></mutation>
                                 <field name="MODE">SPLIT</field>
                                 <value name="INPUT">
                                   <block type="variables_get" id="/WB)Y2O$11dxP;/SN45)">
                                     <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                                   </block>
                                 </value>
                                 <value name="DELIM">
                                   <shadow type="text" id=";VCoqB+TG@RMh52G}EYE">
                                     <field name="TEXT">.</field>
                                   </shadow>
                                 </value>
                               </block>
                             </value>
                             <next>
                               <block type="variables_set" id="T$?x2~65=Vri9[a8?8k%">
                                 <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                                 <value name="VALUE">
                                   <block type="text_join" id="70Ille1lOO6A0dp9*#~2">
                                     <mutation items="5"></mutation>
                                     <value name="ADD0">
                                       <block type="lists_getIndex" id="nQ3C@wtOCC2yh:Fd{ggw">
                                         <mutation statement="false" at="true"></mutation>
                                         <field name="MODE">GET</field>
                                         <field name="WHERE">FROM_START</field>
                                         <value name="VALUE">
                                           <block type="variables_get" id="76([X}6^9~VFUnd%~`Ek">
                                             <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                                           </block>
                                         </value>
                                         <value name="AT">
                                           <block type="math_number" id="uN@yD}d8Y=e6~#xECofD">
                                             <field name="NUM">3</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <value name="ADD1">
                                       <block type="text" id="=`c]DQT(AD-O*CtS/0X(">
                                         <field name="TEXT">-</field>
                                       </block>
                                     </value>
                                     <value name="ADD2">
                                       <block type="lists_getIndex" id="Fp`_2{,.S8I8mldy/o!_">
                                         <mutation statement="false" at="true"></mutation>
                                         <field name="MODE">GET</field>
                                         <field name="WHERE">FROM_START</field>
                                         <value name="VALUE">
                                           <block type="variables_get" id="x.]Lsw;Xh~A8Y.wZzT|P">
                                             <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                                           </block>
                                         </value>
                                         <value name="AT">
                                           <block type="math_number" id="4N?#id~j!5/gRzV_yQ62">
                                             <field name="NUM">2</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <value name="ADD3">
                                       <block type="text" id="0A;BnTjo$9$er7r+U*sx">
                                         <field name="TEXT">-</field>
                                       </block>
                                     </value>
                                     <value name="ADD4">
                                       <block type="lists_getIndex" id="~#-)1B%l_GX].i0RAU;-">
                                         <mutation statement="false" at="true"></mutation>
                                         <field name="MODE">GET</field>
                                         <field name="WHERE">FROM_START</field>
                                         <value name="VALUE">
                                           <block type="variables_get" id="n~-6jsx{SdYc8!V%CMdE">
                                             <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                                           </block>
                                         </value>
                                         <value name="AT">
                                           <block type="math_number" id="(1ne5$n@6X]cS@9M74PT">
                                             <field name="NUM">1</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <next>
                                   <block type="update" id="~?9DLd)sf$6INQjlXFAY">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                     <field name="OID">Object ID</field>
                                     <field name="WITH_DELAY">FALSE</field>
                                     <value name="VALUE">
                                       <block type="math_round" id=";EZb@Sj{;{F4e^ICT*s:">
                                         <field name="OP">ROUNDDOWN</field>
                                         <value name="NUM">
                                           <shadow type="math_number" id="8Iw?IcG(|o2Solo8*2uu">
                                             <field name="NUM">3.1</field>
                                           </shadow>
                                           <block type="math_arithmetic" id="/VKmlZaFtPAz_Kw)cYUv" inline="false">
                                             <field name="OP">DIVIDE</field>
                                             <value name="A">
                                               <shadow type="math_number" id="+_SWN)*oG187ehL:XN0z">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="math_arithmetic" id="VZjVcqY!|M([s_nmh56o" inline="false">
                                                 <field name="OP">MINUS</field>
                                                 <value name="A">
                                                   <shadow type="math_number" id="auZ7VA+asVy+tb1DTSSM">
                                                     <field name="NUM">1</field>
                                                   </shadow>
                                                   <block type="time_get" id="gnTFxg@XPTG6R-};bhzb">
                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                     <field name="OPTION">object</field>
                                                   </block>
                                                 </value>
                                                 <value name="B">
                                                   <shadow type="math_number" id="y.}~`1FW?+3-XDHCgKE3">
                                                     <field name="NUM">1</field>
                                                   </shadow>
                                                   <block type="convert_from_date" id="]nSko?E6flrl_]pGO4eN">
                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                     <field name="OPTION">object</field>
                                                     <value name="VALUE">
                                                       <block type="variables_get" id="re?ZJ-%byn9UwJE7EX-a">
                                                         <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <shadow type="math_number" id="f{?Hn1f*Vh,sY!J]Oe!L">
                                                 <field name="NUM">86400000</field>
                                               </shadow>
                                             </value>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </statement>
               </block>
              </xml>
              

              @sneaker75 sagte in Abstand zwischen 2 Daten berechnen:

              Wert Datenpunkt "Austausch_Nitrax" (Typ string): 2022-02-01 10:00:00

              Wenn Datum / Uhrzeit in diesem Format vorliegt, müssen der 3. und 4. Schritt (umsortieren) entfallen.

              Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
              Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

              S 1 Antwort Letzte Antwort
              1
              • paul53P paul53

                @sneaker75 sagte: Datenpunkt1: 18.2.2022 17:10

                Dieses Datumsformat kann nicht so einfach konvertiert werden. Es muss erst einmal umsortiert werden.

                Blockly_temp.JPG

                <xml xmlns="https://developers.google.com/blockly/xml">
                 <variables>
                   <variable id="*[oLSpH(xMVC{;rLFF7B">datum</variable>
                 </variables>
                 <block type="schedule" id="p0rX5zxq4YhKxy]m(?Ld" x="87" y="37">
                   <field name="SCHEDULE">0 5 * * *</field>
                   <statement name="STATEMENT">
                     <block type="variables_set" id="V+R[6xi[r:@!*U=S;BB{">
                       <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                       <value name="VALUE">
                         <block type="lists_split" id="c#,yC/u_VXaouN*SamI`">
                           <mutation mode="SPLIT"></mutation>
                           <field name="MODE">SPLIT</field>
                           <value name="INPUT">
                             <block type="get_value" id="LvsWD9lw7QVO.ss*;Bah">
                               <field name="ATTR">val</field>
                               <field name="OID">ID auswählen</field>
                             </block>
                           </value>
                           <value name="DELIM">
                             <shadow type="text" id="bhxtu2Na|y(!);[OKw@?">
                               <field name="TEXT"> </field>
                             </shadow>
                           </value>
                         </block>
                       </value>
                       <next>
                         <block type="variables_set" id="01MZ]uZc`bvD-`QXYCjd">
                           <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                           <value name="VALUE">
                             <block type="lists_getIndex" id="h#-IoL#S$~%z].,Ue;pg">
                               <mutation statement="false" at="true"></mutation>
                               <field name="MODE">GET</field>
                               <field name="WHERE">FROM_START</field>
                               <value name="VALUE">
                                 <block type="variables_get" id="5q0mzP?2$={z{Tx}R7%.">
                                   <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                                 </block>
                               </value>
                               <value name="AT">
                                 <block type="math_number" id="NM6pi^5^D5-:]YfLltp(">
                                   <field name="NUM">1</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <next>
                             <block type="variables_set" id="Z.6msibzgcm[5ds0!_tD">
                               <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                               <value name="VALUE">
                                 <block type="lists_split" id="up2*39*3N,b*zP_r+BJF">
                                   <mutation mode="SPLIT"></mutation>
                                   <field name="MODE">SPLIT</field>
                                   <value name="INPUT">
                                     <block type="variables_get" id="/WB)Y2O$11dxP;/SN45)">
                                       <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                                     </block>
                                   </value>
                                   <value name="DELIM">
                                     <shadow type="text" id=";VCoqB+TG@RMh52G}EYE">
                                       <field name="TEXT">.</field>
                                     </shadow>
                                   </value>
                                 </block>
                               </value>
                               <next>
                                 <block type="variables_set" id="T$?x2~65=Vri9[a8?8k%">
                                   <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                                   <value name="VALUE">
                                     <block type="text_join" id="70Ille1lOO6A0dp9*#~2">
                                       <mutation items="5"></mutation>
                                       <value name="ADD0">
                                         <block type="lists_getIndex" id="nQ3C@wtOCC2yh:Fd{ggw">
                                           <mutation statement="false" at="true"></mutation>
                                           <field name="MODE">GET</field>
                                           <field name="WHERE">FROM_START</field>
                                           <value name="VALUE">
                                             <block type="variables_get" id="76([X}6^9~VFUnd%~`Ek">
                                               <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                                             </block>
                                           </value>
                                           <value name="AT">
                                             <block type="math_number" id="uN@yD}d8Y=e6~#xECofD">
                                               <field name="NUM">3</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <value name="ADD1">
                                         <block type="text" id="=`c]DQT(AD-O*CtS/0X(">
                                           <field name="TEXT">-</field>
                                         </block>
                                       </value>
                                       <value name="ADD2">
                                         <block type="lists_getIndex" id="Fp`_2{,.S8I8mldy/o!_">
                                           <mutation statement="false" at="true"></mutation>
                                           <field name="MODE">GET</field>
                                           <field name="WHERE">FROM_START</field>
                                           <value name="VALUE">
                                             <block type="variables_get" id="x.]Lsw;Xh~A8Y.wZzT|P">
                                               <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                                             </block>
                                           </value>
                                           <value name="AT">
                                             <block type="math_number" id="4N?#id~j!5/gRzV_yQ62">
                                               <field name="NUM">2</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <value name="ADD3">
                                         <block type="text" id="0A;BnTjo$9$er7r+U*sx">
                                           <field name="TEXT">-</field>
                                         </block>
                                       </value>
                                       <value name="ADD4">
                                         <block type="lists_getIndex" id="~#-)1B%l_GX].i0RAU;-">
                                           <mutation statement="false" at="true"></mutation>
                                           <field name="MODE">GET</field>
                                           <field name="WHERE">FROM_START</field>
                                           <value name="VALUE">
                                             <block type="variables_get" id="n~-6jsx{SdYc8!V%CMdE">
                                               <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                                             </block>
                                           </value>
                                           <value name="AT">
                                             <block type="math_number" id="(1ne5$n@6X]cS@9M74PT">
                                               <field name="NUM">1</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                   <next>
                                     <block type="update" id="~?9DLd)sf$6INQjlXFAY">
                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                       <field name="OID">Object ID</field>
                                       <field name="WITH_DELAY">FALSE</field>
                                       <value name="VALUE">
                                         <block type="math_round" id=";EZb@Sj{;{F4e^ICT*s:">
                                           <field name="OP">ROUNDDOWN</field>
                                           <value name="NUM">
                                             <shadow type="math_number" id="8Iw?IcG(|o2Solo8*2uu">
                                               <field name="NUM">3.1</field>
                                             </shadow>
                                             <block type="math_arithmetic" id="/VKmlZaFtPAz_Kw)cYUv" inline="false">
                                               <field name="OP">DIVIDE</field>
                                               <value name="A">
                                                 <shadow type="math_number" id="+_SWN)*oG187ehL:XN0z">
                                                   <field name="NUM">1</field>
                                                 </shadow>
                                                 <block type="math_arithmetic" id="VZjVcqY!|M([s_nmh56o" inline="false">
                                                   <field name="OP">MINUS</field>
                                                   <value name="A">
                                                     <shadow type="math_number" id="auZ7VA+asVy+tb1DTSSM">
                                                       <field name="NUM">1</field>
                                                     </shadow>
                                                     <block type="time_get" id="gnTFxg@XPTG6R-};bhzb">
                                                       <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                       <field name="OPTION">object</field>
                                                     </block>
                                                   </value>
                                                   <value name="B">
                                                     <shadow type="math_number" id="y.}~`1FW?+3-XDHCgKE3">
                                                       <field name="NUM">1</field>
                                                     </shadow>
                                                     <block type="convert_from_date" id="]nSko?E6flrl_]pGO4eN">
                                                       <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                       <field name="OPTION">object</field>
                                                       <value name="VALUE">
                                                         <block type="variables_get" id="re?ZJ-%byn9UwJE7EX-a">
                                                           <field name="VAR" id="*[oLSpH(xMVC{;rLFF7B">datum</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                               <value name="B">
                                                 <shadow type="math_number" id="f{?Hn1f*Vh,sY!J]Oe!L">
                                                   <field name="NUM">86400000</field>
                                                 </shadow>
                                               </value>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </statement>
                 </block>
                </xml>
                

                @sneaker75 sagte in Abstand zwischen 2 Daten berechnen:

                Wert Datenpunkt "Austausch_Nitrax" (Typ string): 2022-02-01 10:00:00

                Wenn Datum / Uhrzeit in diesem Format vorliegt, müssen der 3. und 4. Schritt (umsortieren) entfallen.

                S Offline
                S Offline
                Sneaker75
                schrieb am zuletzt editiert von
                #7

                @paul53 Danke, das war die Lösung!

                Mit diesem Script erhalte ich jetzt den Wert 20:

                2471b3c0-fdcb-40f9-96ea-5f0685943d93-grafik.png

                1 Antwort Letzte Antwort
                0
                Antworten
                • In einem neuen Thema antworten
                Anmelden zum Antworten
                • Älteste zuerst
                • Neuste zuerst
                • Meiste Stimmen


                Support us

                ioBroker
                Community Adapters
                Donate

                398

                Online

                32.5k

                Benutzer

                81.8k

                Themen

                1.3m

                Beiträge
                Community
                Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                ioBroker Community 2014-2025
                logo
                • Anmelden

                • Du hast noch kein Konto? Registrieren

                • Anmelden oder registrieren, um zu suchen
                • Erster Beitrag
                  Letzter Beitrag
                0
                • Home
                • Aktuell
                • Tags
                • Ungelesen 0
                • Kategorien
                • Unreplied
                • Beliebt
                • GitHub
                • Docu
                • Hilfe