<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Extract Part of a String Before a Delimiter in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-Extract-Part-of-a-String-Before-a-Delimiter/m-p/900649#M17604</link>
    <description>&lt;P&gt;You are very close! This looks like a learning exercise so I won't give the answer away entirely, but I'll give you a hint. Consider that the length of the substring before : varies in length:&lt;/P&gt;
&lt;PRE&gt;10-5:23.6,-51.2
10-100:23.6,-51.2&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you could find the position of the :, then you would know exactly how long your substring needs to be:&lt;/P&gt;
&lt;PRE&gt;10-5:23.6,-51.2&lt;BR /&gt;    ^&lt;BR /&gt;    5&lt;BR /&gt;
10-100:23.6,-51.2&lt;BR /&gt;      ^&lt;BR /&gt;      7&lt;/PRE&gt;
&lt;P&gt;Is there another function that can help you do this?&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2023 11:44:38 GMT</pubDate>
    <dc:creator>Stu_SAS</dc:creator>
    <dc:date>2023-10-30T11:44:38Z</dc:date>
    <item>
      <title>How to Extract Part of a String Before a Delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-Extract-Part-of-a-String-Before-a-Delimiter/m-p/900600#M17603</link>
      <description>&lt;P&gt;Hi there!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm asked to do the following below in SAS Visual Analytics. I'm using SAS Viya for Learners 3.5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ngunan0921_0-1698653333348.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89227i798CD0451753A1A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ngunan0921_0-1698653333348.png" alt="ngunan0921_0-1698653333348.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is what I have so far. it looks good in the beginning but once I reach the later parts of the data, the string I want isn't correctly extracted. I need assistance on how to extract part of a string before a delimiter. In this case, before the colon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ngunan0921_1-1698653526584.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89228i7D9DB2C7E6CD602A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ngunan0921_1-1698653526584.png" alt="ngunan0921_1-1698653526584.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ngunan0921_2-1698653769644.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89229iB249E99814FC06B9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ngunan0921_2-1698653769644.png" alt="ngunan0921_2-1698653769644.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 08:17:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-Extract-Part-of-a-String-Before-a-Delimiter/m-p/900600#M17603</guid>
      <dc:creator>ngunan0921</dc:creator>
      <dc:date>2023-10-30T08:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to Extract Part of a String Before a Delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-Extract-Part-of-a-String-Before-a-Delimiter/m-p/900649#M17604</link>
      <description>&lt;P&gt;You are very close! This looks like a learning exercise so I won't give the answer away entirely, but I'll give you a hint. Consider that the length of the substring before : varies in length:&lt;/P&gt;
&lt;PRE&gt;10-5:23.6,-51.2
10-100:23.6,-51.2&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you could find the position of the :, then you would know exactly how long your substring needs to be:&lt;/P&gt;
&lt;PRE&gt;10-5:23.6,-51.2&lt;BR /&gt;    ^&lt;BR /&gt;    5&lt;BR /&gt;
10-100:23.6,-51.2&lt;BR /&gt;      ^&lt;BR /&gt;      7&lt;/PRE&gt;
&lt;P&gt;Is there another function that can help you do this?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 11:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-Extract-Part-of-a-String-Before-a-Delimiter/m-p/900649#M17604</guid>
      <dc:creator>Stu_SAS</dc:creator>
      <dc:date>2023-10-30T11:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Extract Part of a String Before a Delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-Extract-Part-of-a-String-Before-a-Delimiter/m-p/901009#M17616</link>
      <description>&lt;P&gt;It took me some time to figure it out. I thought it was the getlength at first but I realized it's the findchar.&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the hint!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 06:18:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-Extract-Part-of-a-String-Before-a-Delimiter/m-p/901009#M17616</guid>
      <dc:creator>ngunan0921</dc:creator>
      <dc:date>2023-11-01T06:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to Extract Part of a String Before a Delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-Extract-Part-of-a-String-Before-a-Delimiter/m-p/901105#M17617</link>
      <description>&lt;P&gt;Bingo! Awesome work&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;Substring('from_loc'n, 1, FindChar('from_loc'n, ':')-1)&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Nov 2023 16:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-Extract-Part-of-a-String-Before-a-Delimiter/m-p/901105#M17617</guid>
      <dc:creator>Stu_SAS</dc:creator>
      <dc:date>2023-11-01T16:34:31Z</dc:date>
    </item>
  </channel>
</rss>

