...
dtToDtAdd: adds one dateTime to another dateTime; results in a duration of minutes or seconds. Note: This is not to be considered a traditional add function. Rather, the result is in fact an invert of a subtraction of the two inputs. Meaning, if the difference is 30 minutes, then the result is written as -30 min. So it is actually subtracting the two inputs and then inverting the math sign of the result.
dtToDtSub: subtracts one dateTime from another dateTime; results in a duration of minutes or seconds
timeToTimeAdd: adds one time to another time; results in a duration of minutes or seconds. Note: This is not to be considered a traditional add function. Rather, the result is in fact an invert of a subtraction of the two inputs. Meaning, if the difference is 30 minutes, then the result is written as -30 min. So it is actually subtracting the two inputs and then inverting the math sign of the result.
timeToTimeSub: subracts one time from another time; results in a duration of minutes or seconds
Time Conversion Blocks
...
dateToString: converts a part of date into a string. This block extracts a selected portion of the date and converts it to the actual Month or Day of the week.
In the example below, we show how to use the block to extract those two entities from the date.
timeToMinutes: converts a time value to a number of minutes
The above screenshot represents several examples of the date/time block usage.
- a tag will get the date and time value from the site associated with the target Ref of the program
- another tag will get only the time value from a date & time tag(the one create at the first step)
- then using the dateToString block the value only for the weekday and month are picked from the same time
- finally using the dateToNumber block there are several numbers collected from the same tag for
Click on the link below to watch a video demonstration on how the above example was set up!
770710541minutes. In the example below, we have converted current time of 19:20 to 1160 minutes. Also, you will see that we took minutes and divided it by 60 to get the current hour of the day. That result is 19.33 hours, or 7:20pm (.33 hours is approximately 20 minutes).
Examples
to be provided soon