...
- date: grabs the date part of a date time point value
- time: grabs the time part of a date time point value
- dayToNumbervalue
- dateTimeAdd: add a duration (hrs, mins, or secs) from a dateTime
- dateTimeSub: substract a duration (hrs, mins, or secs) from a dateTime
- dateToNumber: converts the date into a number
- dayToStringdateToString: converts a part of date into a string
- dtToDtAdd: add one dateTime to another dateTime; results in a duration of minutes or seconds
- dtToDtSub: subtract one dateTime from another dateTime; results in a duration of minutes or seconds
- now: get the current dateTime for the host
- siteDateTime: get the current data date and time for the site associated with the target Ref of the bline program
These are the main blocks, but there are 2 other blocks that provide specific operations for the time:
- dateTimeAdd: add a duration from a dateTime. (minutes are the assumed unit)
- dateTimeSub: substract a duration from a dateTime (minutes are the assumed unittime: extracts just the time part of a date time value
- timeToMinutes: converts a time value to a number of minutes
- timeToTimeAdd: add one time to another time; results in a duration of minutes or seconds
- timeToTimeSub: subracts one time from another time; results in a duration of minutes or seconds
Some blocks have inputs or results in dateTime format, while others in simple time format. Blocks that require a time format input might not work if a dateTime value is used as the input.
dateTime example: 2019-07-04 14:39:15:149 (date and time with milliseconds)
time example: 14:39:15 (just hours:minutes:seconds)
The Blocks can be found in the B-Line app, after creating a new programBlock Library in the Time group.
Date & Time Block Properties
...
- 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!
Date, Time, Day blocks770710541