0

How to get day of tomorrow as variable

PIotr Witkowski yesterday at 4:08 a.m. in Devices / Other updated by Jürgen Jürgenson 22 hours ago 4

I look for "next-day" as variable in format YYYY-MM-DD. I can easily get "today" in such format from built-in "Time" but I have no idea how to get day of tomorrow. Its not simple math calculation by adding +1 to the day variable becuase end month and year changes. I look forward on your help.

Hey

This is done with the new DateTime variable. This worked fine/reliably on last beta version, but with the 4.11.25 I cant link them anymore so we need to wait for a fix. So I cant send you the template just yet.

On the picture: 1. Is linked with servers time so it updates its values automatically. Then you add 86400 to UNIX time so it add 1 day to it.
The result is linked with nr 2 double's value. And it was linked(reference) with the final dateTime variable marked as nr 3 on the pic. Then you can use the nr 3 DateTime values and they should be correctly calculated.

Image 5349

Tasks (Date calc unix).bos
Here is the template. But as I said you cant link the calculated unix with the last DateTime variable. It may still work on beta version, but i haven't had the time to test it yet.

+1

Thx. Indeed after upgrading to the latest release (4.11.25) i can see "DateTime" variable and I could manage to get next day. See below solution:

1. Set "DateTime" var as input from system time bOS represnting "today"

2. Set "Calculation" taking innput UnitTime from variable in Point1 and adding 86400s (1D)

3. Set another "DateTime" var representing next day "tomorrow"

4. Set "Program" which is beeing triegger every 1min OnChange based on builtin Time. As command set "Calculated" var from Point2 into "DateTime" from Point3 (UnixTime).


Many thx for tip!

+1

Tasks (Date calc unix).bos
I also updated this template. Added program that updates the calculated unix value and links it with the last datetime variable.