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.
The Blocks can be found in the Block Library in the Time group.
Date and Time Blocks
These four blocks provide or extract a value of time or dateTime, depending on your usage and need.
date: Extracts just the date portion of a date time value.
time: Extracts just the time portion of a date time value.
now: Gets the current dateTime from the host PC where the program is running
siteDateTime: Gets the current date and time for the site associated with the target Ref of the bline program.
Time Add and Subtract Blocks
dateTimeAdd: Adds a duration (days, hrs, mins, or secs) to a dateTime.
dateTimeSub: Subtracts a duration (days, hrs, mins, or secs) from a dateTime.
dtToDtAdd: Adds one dateTime to another dateTime; results in a duration of minutes or seconds.
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.
timeToTimeSub: Subracts one time from another time; results in a duration of minutes or seconds.
Time Conversion Blocks
dateToNumber: Converts the date into a number. This block extracts a selected portion of the date and converts it to a number that represents that Year, Month, Day, etc.
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.
timeToMinutes: Converts a time value to a number of minutes. 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).