<?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: Dates with Quotes as Macro variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dates-with-Quotes-as-Macro-variables/m-p/38301#M7676</link>
    <description>Use a concatenation in your CALL SYMPUT so you surround the "formatted" date, as shown below (I use asterisks, not vertical bars for a concatenation - no default codepage problem when sending code via FTP)):&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
CALL SYMPUT('myvar','"' !! put(today(),yymmdd10.) !! '"');&lt;BR /&gt;
run;&lt;BR /&gt;
%put &amp;amp;myvar;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Thu, 28 May 2009 23:22:15 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-05-28T23:22:15Z</dc:date>
    <item>
      <title>Dates with Quotes as Macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dates-with-Quotes-as-Macro-variables/m-p/38300#M7675</link>
      <description>I'm trying to create a macro variable in the form of 'yyyy-mm-dd' to pass to a DB2 query in a PROC SQL pass-thru query.&lt;BR /&gt;
&lt;BR /&gt;
I use the following code to get the date, but don;t know how to include the quotes that DB2 requires.&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  filedate = today() - 1;&lt;BR /&gt;
  filedt = put(filedate,yymmdd10.);&lt;BR /&gt;
  call symput('fdate',filedt); &lt;BR /&gt;
  run;&lt;BR /&gt;
&lt;BR /&gt;
Can anybody show me how to come up with a macro variable that includes the quotes?&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Thu, 28 May 2009 23:12:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dates-with-Quotes-as-Macro-variables/m-p/38300#M7675</guid>
      <dc:creator>RHL</dc:creator>
      <dc:date>2009-05-28T23:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dates with Quotes as Macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dates-with-Quotes-as-Macro-variables/m-p/38301#M7676</link>
      <description>Use a concatenation in your CALL SYMPUT so you surround the "formatted" date, as shown below (I use asterisks, not vertical bars for a concatenation - no default codepage problem when sending code via FTP)):&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
CALL SYMPUT('myvar','"' !! put(today(),yymmdd10.) !! '"');&lt;BR /&gt;
run;&lt;BR /&gt;
%put &amp;amp;myvar;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 28 May 2009 23:22:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dates-with-Quotes-as-Macro-variables/m-p/38301#M7676</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-05-28T23:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dates with Quotes as Macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dates-with-Quotes-as-Macro-variables/m-p/38302#M7677</link>
      <description>Thanks.  That really helped.  It's amazing how simple the solution is to a problem I've tried to solve the whole afternoon!</description>
      <pubDate>Thu, 28 May 2009 23:51:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dates-with-Quotes-as-Macro-variables/m-p/38302#M7677</guid>
      <dc:creator>RHL</dc:creator>
      <dc:date>2009-05-28T23:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dates with Quotes as Macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dates-with-Quotes-as-Macro-variables/m-p/38303#M7678</link>
      <description>Also,&lt;BR /&gt;
[pre]&lt;BR /&gt;
data _null_;&lt;BR /&gt;
CALL SYMPUT('myvar',quote(put(today(),yymmdd10.)));&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 29 May 2009 03:36:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dates-with-Quotes-as-Macro-variables/m-p/38303#M7678</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2009-05-29T03:36:59Z</dc:date>
    </item>
  </channel>
</rss>

