{"id":1938,"date":"2022-07-08T14:56:13","date_gmt":"2022-07-08T14:56:13","guid":{"rendered":"https:\/\/logicbuilder.integroscrm.com\/help\/?page_id=1938"},"modified":"2022-07-08T15:25:22","modified_gmt":"2022-07-08T15:25:22","slug":"dates-and-strings","status":"publish","type":"page","link":"https:\/\/logicbuilder.integroscrm.com\/help\/dates-and-strings\/","title":{"rendered":"Dates &#038; Strings"},"content":{"rendered":"\n<p><span style=\"font-size:17px;\">Release date: 2021-03-13<\/span><\/p>\n\n\n\n<p><span style=\"font-size:17px\"><b>Terms<\/b><\/span><\/p>\n\n\n\n<p>Data with which Logic Builder operates can be of two types: date only or date with time.<\/p>\n\n\n\n<p>Date is a data type which contains data only, e.g.&nbsp; 2020-03-12<\/p>\n\n\n\n<p>Datetime is a data type which contains data and time, e.g. 2020-03-12 04:00:00<br><\/p>\n\n\n\n<p><span style=\"font-size:17px\"><b>Changes related to operating with Dates in Logic Builder<\/b><\/span><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>Date Add, Date Difference, Date Interval now respect an input format<\/strong><\/li><\/ol>\n\n\n\n<p>Operators <strong><strong><span style=\"color:#ec8f45;\">Date Add<\/span><\/strong><\/strong>,<strong> <strong><strong><span style=\"color:#ec8f45;\">Date Difference<\/span><\/strong><\/strong><\/strong>, and<strong><strong> <strong><strong><span style=\"color:#ec8f45;\">Date Interval<\/span><\/strong> <\/strong><\/strong><\/strong>provides a result based on the input:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>When input is Date, a result is just Date as well.<\/li><li>When input is Datetime, a result is Datetime as well.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Input<\/strong><\/td><td><strong>Example: Date Add +1 Day: previous version<\/strong><\/td><td><strong>Example: Date Add +1 Day: current version<\/strong><\/td><\/tr><tr><td>2020-03-12<\/td><td>2020-03-13 04:00<\/td><td>2020-03-13<\/td><\/tr><tr><td>2020-03-12 04:00<\/td><td>2020-03-13 04:00<\/td><td>2020-03-13 04:00<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li><strong>New Operators to work with Dates<\/strong><\/li><\/ol>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><strong><span style=\"color:#ec8f45;\">Get Date from Datetime<\/span><\/strong> <\/strong>allows you to convert Datetime to Date<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-1-1024x312.png\" alt=\"\" class=\"wp-image-1940\" width=\"653\" height=\"199\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-1-1024x312.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-1-300x92.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-1-768x234.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-1.png 1180w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/figure>\n\n\n\n<p><em>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.&nbsp;<\/em><\/p>\n\n\n\n<p><em>Let\u2019s 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<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><strong><span style=\"color:#ec8f45;\">Today<\/span><\/strong><\/strong> \u2013 similar to familiar <span style=\"color:#ec8f45;\"><strong>Current Date<\/strong><\/span><strong><strong><br><strong><strong><span style=\"color:#ec8f45;\">Today<\/span><\/strong> <\/strong><\/strong><\/strong>returns only Date. <span style=\"color:#ec8f45;\"><strong>Current Date<\/strong><\/span> returns Datetime.<\/li><\/ul>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li><strong>Date Interval can be set with offset<\/strong><\/li><\/ol>\n\n\n\n<p><strong><strong><span style=\"color:#ec8f45;\">Date Interval<\/span><\/strong> <\/strong>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:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>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<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-2.png\" alt=\"\" class=\"wp-image-1941\" width=\"701\" height=\"219\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-2.png 864w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-2-300x94.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-2-768x240.png 768w\" sizes=\"auto, (max-width: 701px) 100vw, 701px\" \/><\/figure>\n\n\n\n<p><em>E.g. for a date value &#8220;23d February 2021 05:47:00&#8221; with the set time unit to &#8220;Month&#8221; and offset to &#8220;0&#8221;, it returns values &#8220;1st February 2021 00:00:00&#8221; and &#8220;28 February 2021 23:59:59&#8221;<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>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<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-3.png\" alt=\"\" class=\"wp-image-1942\" width=\"703\" height=\"212\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-3.png 864w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-3-300x90.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-3-768x231.png 768w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><\/figure>\n\n\n\n<p><em>E.g. for a date value &#8220;23d February 2021 05:47:00&#8221; with the set time unit to &#8220;Month&#8221; and offset to &#8220;1&#8221;, it returns values &#8220;1st March 2021 00:00:00&#8221; and &#8220;31 March 2021 23:59:59&#8221;<\/em><\/p>\n\n\n\n<p><span style=\"font-size:17px\"><b>New constants to work with strings<\/b><\/span><\/p>\n\n\n\n<p>&nbsp;New Operators to work with a string (usually text) and new-line separators:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><strong><span style=\"color:#ec8f45;\">Carriage Return<\/span><\/strong><\/strong> (\\r)<\/li><li><strong><strong><strong><span style=\"color:#ec8f45;\">Linefeed<\/span><\/strong><\/strong><\/strong> (\\n)<\/li><\/ul>\n\n\n\n<p>&nbsp;Use these operators when there is a need to parse the text received from API to separate text by lines:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"421\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-4-1024x421.png\" alt=\"\" class=\"wp-image-1943\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-4-1024x421.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-4-300x123.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-4-768x316.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/dates-and-strings-4.png 1215w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><em>Tips:&nbsp;<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>if you would like to split the text stored in Sugar text-type field, use Linefeed<\/li><li>for strings concatenation use <strong><strong><span style=\"color:#ec8f45;\">New Line<\/span><\/strong><\/strong><\/li><\/ul>\n\n\n\n<p><span style=\"font-size:17px\"><b>Fixed the issue with the installation of large packages on Sugar 10.3.0<\/b><\/span><\/p>\n\n\n\n<p>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.<\/p>\n<div style=\"text-align:left\" class=\"yasr-auto-insert-visitor\"><!--Yasr Visitor Votes Shortcode--><div id='yasr_visitor_votes_1938' class='yasr-visitor-votes'><div class=\"yasr-custom-text-vv-before yasr-custom-text-vv-before-1938\">Click to rate this post!<\/div><div id='yasr-vv-second-row-container-a630d240a9ec6' \n                                        class='yasr-vv-second-row-container'><div id='yasr-visitor-votes-rater-a630d240a9ec6'\n                                      class='yasr-rater-stars-vv'\n                                      data-rater-postid='1938' \n                                      data-rating='0'\n                                      data-rater-starsize='24'\n                                      data-rater-readonly='false'\n                                      data-rater-nonce='fa81b01ba5' \n                                      data-issingular='false'\n                                    ><\/div><div class=\"yasr-vv-stats-text-container\" id=\"yasr-vv-stats-text-container-a630d240a9ec6\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" \n                               class=\"yasr-dashicons-visitor-stats\"\n                               data-postid=\"1938\" \n                               id=\"yasr-stats-dashicon-a630d240a9ec6\">\n                            <path d=\"M18 18v-16h-4v16h4zM12 18v-11h-4v11h4zM6 18v-8h-4v8h4z\"><\/path>\n                          <\/svg><span id=\"yasr-vv-text-container-a630d240a9ec6\" class=\"yasr-vv-text-container\">[Total: <span id=\"yasr-vv-votes-number-container-a630d240a9ec6\">0<\/span>  Average: <span id=\"yasr-vv-average-container-a630d240a9ec6\">0<\/span>]<\/span><\/div><div id='yasr-vv-loader-a630d240a9ec6' class='yasr-vv-container-loader'><\/div><\/div><div id='yasr-vv-bottom-container-a630d240a9ec6' class='yasr-vv-bottom-container'><\/div><\/div><!--End Yasr Visitor Votes Shortcode--><\/div>","protected":false},"excerpt":{"rendered":"<p>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.&nbsp; 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 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/logicbuilder.integroscrm.com\/help\/dates-and-strings\/\"> <span class=\"screen-reader-text\">Dates &#038; Strings<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"tags":[],"class_list":["post-1938","page","type-page","status-publish","hentry"],"yasr_visitor_votes":{"number_of_votes":0,"sum_votes":0,"stars_attributes":{"read_only":false,"span_bottom":false}},"_links":{"self":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1938","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/comments?post=1938"}],"version-history":[{"count":5,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1938\/revisions"}],"predecessor-version":[{"id":1965,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1938\/revisions\/1965"}],"wp:attachment":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/media?parent=1938"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/tags?post=1938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}