<?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: Date Prompt in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-Prompt/m-p/323026#M21600</link>
    <description>&lt;P&gt;If it's not a semicolon I'm missing, it's a double quote!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jan 2017 16:19:46 GMT</pubDate>
    <dc:creator>TomKari</dc:creator>
    <dc:date>2017-01-06T16:19:46Z</dc:date>
    <item>
      <title>Date Prompt</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-Prompt/m-p/322994#M21590</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SA Enterprise Guide and I have a user choice date in parameter which I called "dated", and is from this type: "06/01/2017".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created three macro variable following this:&lt;/P&gt;&lt;P&gt;%let dated_year = %sysfunc(year("&amp;amp;dated."d));&lt;BR /&gt;%let dated_month = %sysfunc(month("&amp;amp;dated."d));&lt;BR /&gt;%let dated_ym = %sysfunc(cats(&amp;amp;dated_year, &amp;amp;dated_month));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First question:&lt;/P&gt;&lt;P&gt;when i put dated_year is correct: "2017".&lt;/P&gt;&lt;P&gt;But when I put dated_month, it's written "1" instead of "01"...it's not very important for dated_month but more problematic for dated_ym which is "20171" instead of "201701".&lt;/P&gt;&lt;P&gt;Do you know how I should do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second question:&lt;/P&gt;&lt;P&gt;I want to format these three macro variable in character, but I don't know how to do it. Do you have an idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 14:53:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-Prompt/m-p/322994#M21590</guid>
      <dc:creator>Planck</dc:creator>
      <dc:date>2017-01-06T14:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Date Prompt</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-Prompt/m-p/323004#M21592</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1, You can use formats to zero-fill your numbers, like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; dated_month = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;(putn(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;(month("&amp;amp;dated."d)), z2.));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Macro variables are always character strings, so you shouldn't have any problem. Can you describe what you're trying to do in a little more detail?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 15:37:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-Prompt/m-p/323004#M21592</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2017-01-06T15:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Date Prompt</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-Prompt/m-p/323005#M21593</link>
      <description>&lt;P&gt;Also note, once you have implemented Tom's solution, the last statement can be simplified:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let dated_ym = &amp;amp;dated_year.&amp;amp;dated_month.;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 15:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-Prompt/m-p/323005#M21593</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-01-06T15:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Date Prompt</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-Prompt/m-p/323013#M21594</link>
      <description>&lt;P&gt;Thanks for both of you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can accept only one topic as a solution, but you both helped me... for the first question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the second:&lt;/P&gt;&lt;P&gt;I try to&amp;nbsp;do something like that:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE A&lt;BR /&gt;(DA_IN char(6));&lt;/P&gt;&lt;P&gt;INSERT INTO A values (&amp;amp;dated_ym.);&lt;BR /&gt;QUIT;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I got this.&lt;/P&gt;&lt;P&gt;Value 1 of VALUES clause 1 does not match the data type of the corresponding column in the object-item list (in the SELECT&lt;BR /&gt;clause).&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 15:52:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-Prompt/m-p/323013#M21594</guid>
      <dc:creator>Planck</dc:creator>
      <dc:date>2017-01-06T15:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Date Prompt</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-Prompt/m-p/323018#M21596</link>
      <description>&lt;P&gt;Oups sorry I know, I just forgot the double-quotes :S&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for this.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 15:57:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-Prompt/m-p/323018#M21596</guid>
      <dc:creator>Planck</dc:creator>
      <dc:date>2017-01-06T15:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Date Prompt</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-Prompt/m-p/323026#M21600</link>
      <description>&lt;P&gt;If it's not a semicolon I'm missing, it's a double quote!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 16:19:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-Prompt/m-p/323026#M21600</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2017-01-06T16:19:46Z</dc:date>
    </item>
  </channel>
</rss>

