<?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 Having trouble creating a date variable to use in report headings in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Having-trouble-creating-a-date-variable-to-use-in-report/m-p/22730#M3556</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use syntax like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;&lt;P&gt;﻿title "This report created on %sysfunc(today(),yymmddn8.)";&lt;BR /&gt;proc print data=sashelp.class;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%put &amp;amp;sysdate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;title "This report created on &lt;STRONG&gt;%sysfunc(today(),yymmddn8.)&lt;/STRONG&gt;";&lt;BR /&gt;proc print data=sashelp.class;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is also an automatic macro var &lt;STRONG&gt;&amp;amp;sysdate&lt;/STRONG&gt; which could be used. Just be aware that the value of this var is the date of when you started your session - and with some people having sessions open for days the value of this var can become a bit "outdated".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jun 2011 00:29:45 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2011-06-29T00:29:45Z</dc:date>
    <item>
      <title>Having trouble creating a date variable to use in report headings</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Having-trouble-creating-a-date-variable-to-use-in-report/m-p/22729#M3555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to add a date to my reports both in the heading and the file name when I export them.&amp;nbsp; Can someone help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-d&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 21:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Having-trouble-creating-a-date-variable-to-use-in-report/m-p/22729#M3555</guid>
      <dc:creator>Dick_Shryock</dc:creator>
      <dc:date>2011-06-28T21:09:45Z</dc:date>
    </item>
    <item>
      <title>Having trouble creating a date variable to use in report headings</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Having-trouble-creating-a-date-variable-to-use-in-report/m-p/22730#M3556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use syntax like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;&lt;P&gt;﻿title "This report created on %sysfunc(today(),yymmddn8.)";&lt;BR /&gt;proc print data=sashelp.class;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%put &amp;amp;sysdate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;title "This report created on &lt;STRONG&gt;%sysfunc(today(),yymmddn8.)&lt;/STRONG&gt;";&lt;BR /&gt;proc print data=sashelp.class;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is also an automatic macro var &lt;STRONG&gt;&amp;amp;sysdate&lt;/STRONG&gt; which could be used. Just be aware that the value of this var is the date of when you started your session - and with some people having sessions open for days the value of this var can become a bit "outdated".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 00:29:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Having-trouble-creating-a-date-variable-to-use-in-report/m-p/22730#M3556</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2011-06-29T00:29:45Z</dc:date>
    </item>
    <item>
      <title>Having trouble creating a date variable to use in report headings</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Having-trouble-creating-a-date-variable-to-use-in-report/m-p/22731#M3557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Patrick, that was helpful but not exactly what I'm looking for (poorly worded question).&amp;nbsp; I have a variable named RptDate that I want to use in the report heading.&amp;nbsp; It could be any date or date range it is text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried "Emergency Department data for " &amp;amp;RptDate&amp;nbsp;&amp;nbsp; and "Emergency Department data for &amp;amp;RptDate"&amp;nbsp; and both just produce the literal &amp;amp;RptDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm missing somthing very fundament here, but can't seem to put my finger on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-d&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 10:27:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Having-trouble-creating-a-date-variable-to-use-in-report/m-p/22731#M3557</guid>
      <dc:creator>Dick_Shryock</dc:creator>
      <dc:date>2011-06-29T10:27:46Z</dc:date>
    </item>
    <item>
      <title>Having trouble creating a date variable to use in report headings</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Having-trouble-creating-a-date-variable-to-use-in-report/m-p/22732#M3558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Most likely the rptdate is not resolving . Could you please share the code where rptdate is declared or if log can be shared. &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;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 13:20:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Having-trouble-creating-a-date-variable-to-use-in-report/m-p/22732#M3558</guid>
      <dc:creator>manojinpec</dc:creator>
      <dc:date>2011-06-29T13:20:14Z</dc:date>
    </item>
    <item>
      <title>Having trouble creating a date variable to use in report headings</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Having-trouble-creating-a-date-variable-to-use-in-report/m-p/22733#M3559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If RptDate is a data value that you are reading in, then you need to use the CALL SYMPUT or CALL SYMPUTX macro functions to assign the data value to a macro variable's value and then use the macro variable in the TITLE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works if you have one value for RptDate for the entire report.&amp;nbsp; Otherwise, you will need to either bust the report apart so there are multiple reports (one for each RptDate) or use the BY capability for the TITLE statements to insert the BY-variable into the Title. (Output data set names can use MACRO variables, but not the BY functionality).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 13:44:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Having-trouble-creating-a-date-variable-to-use-in-report/m-p/22733#M3559</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2011-06-29T13:44:50Z</dc:date>
    </item>
    <item>
      <title>Having trouble creating a date variable to use in report headings</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Having-trouble-creating-a-date-variable-to-use-in-report/m-p/22734#M3560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to share some sample code/explain your data better in order to give you a good answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be below sample is helpful for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set sashelp.class;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; retain rptdate;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; rptdate='01JAN2011 - 10Jan2011';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options nobyline;&lt;BR /&gt;title "RPTDATE has value #BYVAL(rptdate)";&lt;BR /&gt;proc print data=have;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; by rptdate;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 01:07:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Having-trouble-creating-a-date-variable-to-use-in-report/m-p/22734#M3560</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2011-06-30T01:07:43Z</dc:date>
    </item>
  </channel>
</rss>

