<?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 Easy date question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Easy-date-question/m-p/14953#M1926</link>
    <description>Hi everybody,&lt;BR /&gt;
&lt;BR /&gt;
I guess this is a very easy one, but I just cant figure it out on this friday afternoon...&lt;BR /&gt;
&lt;BR /&gt;
I am passing a date9 value to another job in a loop, so it gets there as a macro variable.&lt;BR /&gt;
&lt;BR /&gt;
So I have a variable &amp;amp;date, which resolves to 17998.&lt;BR /&gt;
&lt;BR /&gt;
How do I convert it back to a DATE9. value? What's the name of the format of "17998".&lt;BR /&gt;
&lt;BR /&gt;
data _null;&lt;BR /&gt;
   format x DATE9.;&lt;BR /&gt;
   x = input(resolve('&amp;amp;date'),DATE9.);&lt;BR /&gt;
...&lt;BR /&gt;
&lt;BR /&gt;
does not work.&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot!&lt;BR /&gt;
&lt;BR /&gt;
Thomas</description>
    <pubDate>Fri, 03 Apr 2009 12:59:22 GMT</pubDate>
    <dc:creator>ThomasH</dc:creator>
    <dc:date>2009-04-03T12:59:22Z</dc:date>
    <item>
      <title>Easy date question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Easy-date-question/m-p/14953#M1926</link>
      <description>Hi everybody,&lt;BR /&gt;
&lt;BR /&gt;
I guess this is a very easy one, but I just cant figure it out on this friday afternoon...&lt;BR /&gt;
&lt;BR /&gt;
I am passing a date9 value to another job in a loop, so it gets there as a macro variable.&lt;BR /&gt;
&lt;BR /&gt;
So I have a variable &amp;amp;date, which resolves to 17998.&lt;BR /&gt;
&lt;BR /&gt;
How do I convert it back to a DATE9. value? What's the name of the format of "17998".&lt;BR /&gt;
&lt;BR /&gt;
data _null;&lt;BR /&gt;
   format x DATE9.;&lt;BR /&gt;
   x = input(resolve('&amp;amp;date'),DATE9.);&lt;BR /&gt;
...&lt;BR /&gt;
&lt;BR /&gt;
does not work.&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot!&lt;BR /&gt;
&lt;BR /&gt;
Thomas</description>
      <pubDate>Fri, 03 Apr 2009 12:59:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Easy-date-question/m-p/14953#M1926</guid>
      <dc:creator>ThomasH</dc:creator>
      <dc:date>2009-04-03T12:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Easy date question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Easy-date-question/m-p/14954#M1927</link>
      <description>Use the SAS PUT function in an assignment statement with the desired format, such as DATE9. for your macro variable, either in a DATA step CALL SYMPUT or in a %LET statement using %SYSFUNC.&lt;BR /&gt;
&lt;BR /&gt;
The SAS support &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website has a wealth of documentation and supplemental technical content - here is a Google advanced search argument which yielded several useful matches on this topic:&lt;BR /&gt;
&lt;BR /&gt;
put macro variable date display site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 03 Apr 2009 13:10:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Easy-date-question/m-p/14954#M1927</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-04-03T13:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Easy date question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Easy-date-question/m-p/14955#M1928</link>
      <description>If &amp;amp;DATE resolves to 17998, there's no conversion needed, just the appropriate format.&lt;BR /&gt;
&lt;BR /&gt;
Just X=&amp;amp;DATE will do the job.&lt;BR /&gt;
&lt;BR /&gt;
Actualy DATE9. is a numeric format.&lt;BR /&gt;
&lt;BR /&gt;
17998 and '11APR2009'd  are the same.&lt;BR /&gt;
&lt;BR /&gt;
To see X as DATE9, just apply the format DATE9. to the X, or use formatted print (put X date9.;)&lt;BR /&gt;
&lt;BR /&gt;
For example:&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
X=17998;&lt;BR /&gt;
put X date9.;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
and you will see the NUMERIC value 17998 formated with the NUMERIC format date9.&lt;BR /&gt;
&lt;BR /&gt;
Hope it helps.&lt;BR /&gt;
&lt;BR /&gt;
ps: btw the call resolve("&amp;amp;DATE") is useless "&amp;amp;DATE" just will do.&lt;BR /&gt;
&lt;BR /&gt;
Greetings from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos at &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
      <pubDate>Fri, 03 Apr 2009 15:21:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Easy-date-question/m-p/14955#M1928</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2009-04-03T15:21:09Z</dc:date>
    </item>
  </channel>
</rss>

