{"id":817,"date":"2022-01-14T14:02:15","date_gmt":"2022-01-14T14:02:15","guid":{"rendered":"https:\/\/logicbuilder.integroscrm.com\/help\/?page_id=817"},"modified":"2022-08-03T15:17:36","modified_gmt":"2022-08-03T15:17:36","slug":"get-string-from-date","status":"publish","type":"page","link":"https:\/\/logicbuilder.integroscrm.com\/help\/get-string-from-date\/","title":{"rendered":"Get String From Date"},"content":{"rendered":"\n<p><a name=\"abstract\"><\/a>Converts string to date. &nbsp;Useful when date or datetime from Sugar is needed to send to an external resource with a format that differs from the Sugar date\/datetime format.<\/p>\n\n\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<p>If you use Date or Datetime Type fields to compose API requests (using <b><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/rest-client\/\">Rest Client<\/a><\/b> operator), then <u>you&nbsp;need to use<\/u> <b><span style=\"color:#ec8f45;\">Get String From Date<\/span><\/b> operator in order to format dates properly.<\/p>\n<\/div>\n\n\n<p><strong>inputs:<\/strong><\/p>\n\n\n\n<p><span style=\"color:#64c6ca;\">date<\/span> &#8211; link with a date or datetime that is needed to convert in another format<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Required: yes<\/li><\/ul>\n\n\n\n<p><span style=\"color:#9ed267;\">format<\/span> &#8211; specify the format of the convert &#8211; how date should be represented in result. The full list of allowed date formats you can find&nbsp;<a href=\"https:\/\/www.php.net\/manual\/en\/datetime.format.php\" rel=\"noreferrer noopener\" target=\"_blank\">here<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Required: yes<\/li><\/ul>\n\n\n\n<p>Most common formats:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>When the resulting date in a string must look like this&#8230;<\/td><td>&#8230;use this format<\/td><\/tr><tr><td>2021-11-27 23:04:13<\/td><td>Y-m-d H:i:s<\/td><\/tr><tr><td>27\/11\/2021 17:45:12<\/td><td>d\/m\/Y H:i:s<\/td><\/tr><tr><td>27\/11\/21<\/td><td>d\/m\/y<\/td><\/tr><tr><td>1637849455<\/td><td>U<\/td><\/tr><tr><td>2021-11-27T15:19:21+00:00<\/td><td>c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>outputs:<\/strong><\/p>\n\n\n\n<p><span style=\"color:#9ed267;\">string<\/span> &#8211; date represented as a string converted from the date input using the specified format<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2021\/12\/img-66-752b591b408848e89ed0e20d7031ec11.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2021\/12\/img-66-752b591b408848e89ed0e20d7031ec11-1024x381.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p><div style=\"text-align:left\" class=\"yasr-auto-insert-visitor\"><!--Yasr Visitor Votes Shortcode--><div id='yasr_visitor_votes_817' class='yasr-visitor-votes'><div class=\"yasr-custom-text-vv-before yasr-custom-text-vv-before-817\">Click to rate this post!<\/div><div id='yasr-vv-second-row-container-c76291eae70e6' \n                                        class='yasr-vv-second-row-container'><div id='yasr-visitor-votes-rater-c76291eae70e6'\n                                      class='yasr-rater-stars-vv'\n                                      data-rater-postid='817' \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-c76291eae70e6\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" \n                               class=\"yasr-dashicons-visitor-stats\"\n                               data-postid=\"817\" \n                               id=\"yasr-stats-dashicon-c76291eae70e6\">\n                            <path d=\"M18 18v-16h-4v16h4zM12 18v-11h-4v11h4zM6 18v-8h-4v8h4z\"><\/path>\n                          <\/svg><span id=\"yasr-vv-text-container-c76291eae70e6\" class=\"yasr-vv-text-container\">[Total: <span id=\"yasr-vv-votes-number-container-c76291eae70e6\">0<\/span>  Average: <span id=\"yasr-vv-average-container-c76291eae70e6\">0<\/span>]<\/span><\/div><div id='yasr-vv-loader-c76291eae70e6' class='yasr-vv-container-loader'><\/div><\/div><div id='yasr-vv-bottom-container-c76291eae70e6' class='yasr-vv-bottom-container'><\/div><\/div><!--End Yasr Visitor Votes Shortcode--><\/div>","protected":false},"excerpt":{"rendered":"<p>Converts string to date. &nbsp;Useful when date or datetime from Sugar is needed to send to an external resource with a format that differs from the Sugar date\/datetime format. If you use Date or Datetime Type fields to compose API requests (using Rest Client operator), then you&nbsp;need to use Get String From Date operator in &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/logicbuilder.integroscrm.com\/help\/get-string-from-date\/\"> <span class=\"screen-reader-text\">Get String From Date<\/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-817","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\/817","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=817"}],"version-history":[{"count":4,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/817\/revisions"}],"predecessor-version":[{"id":2046,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/817\/revisions\/2046"}],"wp:attachment":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/media?parent=817"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/tags?post=817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}