@sneaker75 sagte: Datenpunkt1: 18.2.2022 17:10
Dieses Datumsformat kann nicht so einfach konvertiert werden. Es muss erst einmal umsortiert werden.
Spoiler
<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.