Release date: 2021-03-13
Terms
Data with which Logic Builder operates can be of two types: date only or date with time.
Date is a data type which contains data only, e.g. 2020-03-12
Datetime is a data type which contains data and time, e.g. 2020-03-12 04:00:00
Changes related to operating with Dates in Logic Builder
- Date Add, Date Difference, Date Interval now respect an input format
Operators Date Add, Date Difference, and Date Interval provides a result based on the input:
- When input is Date, a result is just Date as well.
- When input is Datetime, a result is Datetime as well.
Input | Example: Date Add +1 Day: previous version | Example: Date Add +1 Day: current version |
2020-03-12 | 2020-03-13 04:00 | 2020-03-13 |
2020-03-12 04:00 | 2020-03-13 04:00 | 2020-03-13 04:00 |
- New Operators to work with Dates
- Get Date from Datetime allows you to convert Datetime to Date
Please note that when Datetime comes directly from the Sugar database (e.g. after getting value using Get Entity Attributes), it is converted to UTC, not the user timezone.
Let’s say that the User with TimeZone GMT+3 sees the date and time as 2020-08-03 02:00. In database date is 2020-08-02 23:00, which means after converting such Datetime to Date, the date in the result is 2020-08-02
- Today – similar to familiar Current Date
Today returns only Date. Current Date returns Datetime.
- Date Interval can be set with offset
Date Interval allows you to get start Date or Datetime and end Date or Datetime of the period based on Date or Datetime in the input (e.g. first and last day of the month). Now you can set offset to get start and end dates of the period:
- If the offset is 0 or not set then the operator produces the first and the end dates of the specified interval that provided date belongs to
E.g. for a date value “23d February 2021 05:47:00” with the set time unit to “Month” and offset to “0”, it returns values “1st February 2021 00:00:00” and “28 February 2021 23:59:59”
- If the offset is a positive (or negative) number, the operator produces the first and the end dates of the interval shifted from the current by the specified number
E.g. for a date value “23d February 2021 05:47:00” with the set time unit to “Month” and offset to “1”, it returns values “1st March 2021 00:00:00” and “31 March 2021 23:59:59”
New constants to work with strings
New Operators to work with a string (usually text) and new-line separators:
- Carriage Return (\r)
- Linefeed (\n)
Use these operators when there is a need to parse the text received from API to separate text by lines:
Tips:
- if you would like to split the text stored in Sugar text-type field, use Linefeed
- for strings concatenation use New Line
Fixed the issue with the installation of large packages on Sugar 10.3.0
Sugar 10.3.0 used to have an issue with the installation of large packages generated by Logic Builder. It resulted in 502 error during the installation process. Now the issue is fixed. If you have packages generated by previous versions of Logic Builder, which had this error, just open the corresponding flowchart in Logic Builder and generate a new package.