<?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 date and time on excel file in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/date-and-time-on-excel-file/m-p/716369#M27431</link>
    <description>&lt;P&gt;Hi I have several proc reports that should be in an Excel file&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
ODS EXCEL FILE="F:\COVID-19\ \Data\COVID-19  Report(%sysfunc(date(),date9.) %sysfunc(time(),HHMM.)).xlsx" 
	options(sheet_name = 'Tabel 1'
			embedded_titles = 'yes' 
			embedded_footnotes = 'yes' 
            orientation = 'landscape'   
			)  
	author='dsjfsjdk ';

ods noproctitle;
ods noptitle;
title;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I Start it like this - but it gives me this error:&lt;/P&gt;
&lt;H2&gt;error "A component of directory-name is not a directory"&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;I put the right directory, what can the problem be?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2021 11:06:37 GMT</pubDate>
    <dc:creator>mmea</dc:creator>
    <dc:date>2021-02-03T11:06:37Z</dc:date>
    <item>
      <title>date and time on excel file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/date-and-time-on-excel-file/m-p/716369#M27431</link>
      <description>&lt;P&gt;Hi I have several proc reports that should be in an Excel file&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
ODS EXCEL FILE="F:\COVID-19\ \Data\COVID-19  Report(%sysfunc(date(),date9.) %sysfunc(time(),HHMM.)).xlsx" 
	options(sheet_name = 'Tabel 1'
			embedded_titles = 'yes' 
			embedded_footnotes = 'yes' 
            orientation = 'landscape'   
			)  
	author='dsjfsjdk ';

ods noproctitle;
ods noptitle;
title;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I Start it like this - but it gives me this error:&lt;/P&gt;
&lt;H2&gt;error "A component of directory-name is not a directory"&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;I put the right directory, what can the problem be?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 11:06:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/date-and-time-on-excel-file/m-p/716369#M27431</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2021-02-03T11:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: date and time on excel file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/date-and-time-on-excel-file/m-p/716399#M27432</link>
      <description>&lt;P&gt;The colon (created by the HHMM format) is not allowed in Windows file names.&lt;/P&gt;
&lt;P&gt;Instead of&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%sysfunc(time(),HHMM.)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%sysfunc(compress(%sysfunc(time(),hhmm.),:))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And I strongly recommend to NOT use the DATE9 format in filenames, use YYMMDDN8 or YYMMDD10 instead. This sorts nicely.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 12:07:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/date-and-time-on-excel-file/m-p/716399#M27432</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-02-03T12:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: date and time on excel file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/date-and-time-on-excel-file/m-p/716403#M27433</link>
      <description>&lt;P&gt;Okay thanks!&lt;/P&gt;
&lt;P&gt;How can I do it if I want the time to give me just hour like this "13:00"&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 12:17:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/date-and-time-on-excel-file/m-p/716403#M27433</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2021-02-03T12:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: date and time on excel file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/date-and-time-on-excel-file/m-p/716409#M27434</link>
      <description>&lt;P&gt;Use the INTNX function to align times to full hours:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
ftime = intnx('hour',time(),0,'b');
cftime = compress(put(ftime,hhmm.),":");
call symputx("ftime",cftime);
run;

%put &amp;amp;=ftime.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I used the DATA _NULL_ to keep the code readable (I don't like SYSFUNC avalanches).&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 12:40:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/date-and-time-on-excel-file/m-p/716409#M27434</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-02-03T12:40:50Z</dc:date>
    </item>
  </channel>
</rss>

