<?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: change date format in ods destination in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853773#M337440</link>
    <description>I hadn't understood the footnotes' behavior</description>
    <pubDate>Fri, 13 Jan 2023 17:42:16 GMT</pubDate>
    <dc:creator>acordes</dc:creator>
    <dc:date>2023-01-13T17:42:16Z</dc:date>
    <item>
      <title>change date format in ods destination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853741#M337423</link>
      <description>&lt;P&gt;I output several pages to pdf.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want the footnote's date to appear as ddmmyy10. format.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I cannot find the option to do so. The other changes to the footnote are applied correctly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;


proc template; 
define style Style.MyStyle; parent= styles.HtmlBlue;

style fonts /
'TitleFont' = ("Helvetica",8pt,Bold) 
'headingFont' = ("Helvetica",7pt,Bold) 
'docFont' = ("Helvetica",7pt)
'footFont' = ("Times Roman",6pt)
'FixedStrongFont' = ("Courier",8pt,Bold)
'FixedHeadingFont' = ("Courier",8pt,Bold)
'BatchFixedFont' = ("Courier",5.7pt)
'FixedFont' = ("Courier",8pt);
style color_list /
'bgH' = white /* row and column header background */
'bgT' = white /* table background */
'bgD' = white /* data cell background */
'fg' = black /* text color */
'bg' = white; /* page background color */
style Table from Output /
frame = void 
rules = rows 
cellpadding = 2pt 
cellspacing = 0.0pt 
borderwidth = 0.2pt 
background = color_list('bgT');

 Style PageNo from TitlesAndFooters / 
 font = fonts("footFont") 
 cellpadding = 0 
 cellspacing = 0
 pretext = "página "
 posttext = " de ^{lastpage}"
 just=c 
 vjust=b;

 Style date from TitlesAndFooters / 
 font = fonts("footFont") 
 cellpadding = 0 
 cellspacing = 0
 
/*   sasdate='ddmmyy10.' */
 pretext = "Creado: "
/*  posttext = " de ^{lastpage}" */
 just=r 
 vjust=t;

end;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Jan 2023 15:30:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853741#M337423</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2023-01-13T15:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: change date format in ods destination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853753#M337426</link>
      <description>&lt;P&gt;Nesting this inside an ODS statement would do the job, simple and easy:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title1 "Student Listing Report";&lt;BR /&gt;footnote1 "Reported Created on %sysfunc(today(),ddmmyy10.)";&lt;BR /&gt;proc print data=sashelp.class;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="donricardo_0-1673626967452.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79378iCC7CBB54FB62D083/image-size/medium?v=v2&amp;amp;px=400" role="button" title="donricardo_0-1673626967452.png" alt="donricardo_0-1673626967452.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 16:23:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853753#M337426</guid>
      <dc:creator>donricardo</dc:creator>
      <dc:date>2023-01-13T16:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: change date format in ods destination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853759#M337431</link>
      <description>Thanks.&lt;BR /&gt;But that won't work for me because I have 100 pages in the output.&lt;BR /&gt;I want to change the ods's footnote.&lt;BR /&gt;Like changing the sas sysdate format that is displayed on every page.</description>
      <pubDate>Fri, 13 Jan 2023 16:41:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853759#M337431</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2023-01-13T16:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: change date format in ods destination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853760#M337432</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/127222"&gt;@acordes&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks.&lt;BR /&gt;But that won't work for me because I have 100 pages in the output.&lt;BR /&gt;I want to change the ods's footnote.&lt;BR /&gt;Like changing the sas sysdate format that is displayed on every page.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That is as clear as mud.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you talking about the date that is printed on a TITLE when you use the DATE option?&amp;nbsp; If so then you cannot control that.&amp;nbsp; Instead turn OFF the automatic DATE and instead generate your own date string using your own TITLE or FOOTNOTE function.&amp;nbsp; Does not really have anything to do with ODS or styles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are talking about some date that is being generated into a footnote for you then you need to show a working example program that demonstrates the issue.&amp;nbsp; Supply the data required as a data step or use one of the SASHELP datasets so others can test changes to your program.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 16:46:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853760#M337432</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-01-13T16:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: change date format in ods destination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853764#M337435</link>
      <description>I disagree. I could have asked without posting ANY code snippet:&lt;BR /&gt;Is there any option in the "proc template...Style date from TitlesAndFooters /" to control for the date format? &lt;BR /&gt;As I said, the proc template has its effect on the ods pdf that is generated, i. e. the "Creado:" is added as pretext. &lt;BR /&gt;I'm on smartphone now, else I'd add an example code. &lt;BR /&gt;But this time I thought it would suffice without. &lt;BR /&gt;</description>
      <pubDate>Fri, 13 Jan 2023 17:06:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853764#M337435</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2023-01-13T17:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: change date format in ods destination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853767#M337437</link>
      <description>&lt;P&gt;I suspect you are confusing STYLE (font, color etc) with FORMAT (how values are converted to text).&lt;/P&gt;
&lt;P&gt;I don't think that ODS style templates have any control over formats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that SAS also has templates that control what information is printed from procedures. In theory that type of a template might have a method to control the format used to to display values.&amp;nbsp; But I doubt it would apply to something like the automatic run date that is generated outside of the procedure.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 17:20:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853767#M337437</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-01-13T17:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: change date format in ods destination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853769#M337438</link>
      <description>I can live with the date printed as it is.&lt;BR /&gt;That's only a minor formatting issue.&lt;BR /&gt;I'm quite happy with the whole analytics report printed to pdf. &lt;BR /&gt;I should move forward.</description>
      <pubDate>Fri, 13 Jan 2023 17:29:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853769#M337438</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2023-01-13T17:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: change date format in ods destination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853771#M337439</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/127222"&gt;@acordes&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;Is there any option in the "proc template...Style date from TitlesAndFooters /" to control for the date format? &lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In general, I think not. Footnote text, or footer content, is provided by you. SAS has no way of knowing that you will ever want to include a date value or where that date value might come from.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't say exactly where the date value comes from. The statement "I want the footnote's date to appear as ddmmyy10. format." is wonderfully vague because footnotes do not have a natural "date" of any sort.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your previous comment: "But that won't work for me because I have 100 pages in the output." may mean that you are doing other stuff with the footnote and not telling us &lt;STRONG&gt;or&lt;/STRONG&gt; do not understand that FOOTNOTE statements, like Titles, are in effect until cancelled.&lt;/P&gt;
&lt;P&gt;A footnote at the top of the program will provide the same footnote for each output.&lt;/P&gt;
&lt;P&gt;Run this program and you will see the same footnote on each page. Replace the &amp;lt;yourpathgoeshere&amp;gt; with something valid for your output.&lt;/P&gt;
&lt;PRE&gt;ods pdf file="&amp;lt;yourpathgoeshere&amp;gt;\exmaple.pdf";

title1 "Student Listing Report";
footnote1 "Reported Created on %sysfunc(today(),ddmmyy10.)";
proc print data=sashelp.class;
   var name;
run;

title1 "Student name and age";
proc print data=sashelp.class;
   var name age;
run;

title1 "Student name and sex";
proc print data=sashelp.class;
   var name sex;
run;

ods pdf close;&lt;BR /&gt;footnote1;&lt;/PRE&gt;
&lt;P&gt;If you have multiple lines in some of your footnote statements just make sure that the Footnote1 has the date piece.&lt;/P&gt;
&lt;P&gt;Footnote2 through Footnote10 would not replace that part, just add additional lines.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 17:39:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853771#M337439</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-01-13T17:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: change date format in ods destination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853773#M337440</link>
      <description>I hadn't understood the footnotes' behavior</description>
      <pubDate>Fri, 13 Jan 2023 17:42:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-date-format-in-ods-destination/m-p/853773#M337440</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2023-01-13T17:42:16Z</dc:date>
    </item>
  </channel>
</rss>

