<?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: Extracting Created date from csv file in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extracting-Created-date-from-csv-file/m-p/499761#M32112</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/213549"&gt;@brighterlight&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;SAS Datetime values are stored a numeric values representing a count of seconds since 1/1/1960. A format is only for print/display of such a SAS Datetime value.&lt;/P&gt;
&lt;P&gt;SAS offers quite a collection of formats for printing datetime values:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/leforinforref/64790/HTML/default/viewer.htm#n0p2fmevfgj470n17h4k9f27qjag.htm&amp;nbsp;" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/leforinforref/64790/HTML/default/viewer.htm#n0p2fmevfgj470n17h4k9f27qjag.htm&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You&amp;nbsp;best stick to one of the OOTB formats from above BUT if you really must then you can also create your own picture format (using Proc Format). The disadvantage of this: You need to ensure that this format is available whenever you use it so you either store it in a permanent catalog and add the catalog to the format search path (option FMTSEARCH) or you ensure that the code creating the picture format gets always executed when you use the format. ...but: if then storing the data in a permanent table with the format assigned to the variable you still will need the format itself stored in a permanent catalog.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Sep 2018 03:14:45 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2018-09-28T03:14:45Z</dc:date>
    <item>
      <title>Extracting Created date from csv file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extracting-Created-date-from-csv-file/m-p/499515#M32106</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the code found in this website, the output of the created date is in the fomat of&amp;nbsp;26Sep2018:18:06:37.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to ask if it is possible to have the output in this format (26/09/2018:18:06:37)&amp;nbsp; instead?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/40/934.html" target="_blank"&gt;http://support.sas.com/kb/40/934.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;data a(drop=fid);                                                                                                                       
   infile fileref truncover obs=1;                                                                                                       
   fid=fopen('fileref');                                                                                                                 
   Bytes=finfo(fid,'File Size (bytes)');                                                                                                 
   crdate=finfo(fid,'Create Time');                                                                                                      
   moddate=finfo(fid,'Last Modified');                                                                                                   
run;                                                                                                                                    
                                                                                                                                        
proc print;                                                                                                                             
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;Edit by KB: fixed the link.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 13:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extracting-Created-date-from-csv-file/m-p/499515#M32106</guid>
      <dc:creator>brighterlight</dc:creator>
      <dc:date>2018-09-27T13:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting Created date from csv file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extracting-Created-date-from-csv-file/m-p/499523#M32107</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;crdate=input(finfo(fid,'Create Time'),datetime19.);
format crdate e8601dt20.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It gives you a timestamp formatted to ISO standards. You can apply any other datetime format available.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 13:59:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extracting-Created-date-from-csv-file/m-p/499523#M32107</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-09-27T13:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting Created date from csv file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extracting-Created-date-from-csv-file/m-p/499541#M32109</link>
      <description>&lt;P&gt;Hi thanks for the reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to obtain this&amp;nbsp;&lt;/P&gt;&lt;P&gt;2018-09-26T18:05:45&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I ask why is there a letter 'T' in between ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 14:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extracting-Created-date-from-csv-file/m-p/499541#M32109</guid>
      <dc:creator>brighterlight</dc:creator>
      <dc:date>2018-09-27T14:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting Created date from csv file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extracting-Created-date-from-csv-file/m-p/499575#M32111</link>
      <description>&lt;P&gt;Thats part of the ISO standard; you can replace it with the translate() function.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 16:18:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extracting-Created-date-from-csv-file/m-p/499575#M32111</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-09-27T16:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting Created date from csv file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extracting-Created-date-from-csv-file/m-p/499761#M32112</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/213549"&gt;@brighterlight&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;SAS Datetime values are stored a numeric values representing a count of seconds since 1/1/1960. A format is only for print/display of such a SAS Datetime value.&lt;/P&gt;
&lt;P&gt;SAS offers quite a collection of formats for printing datetime values:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/leforinforref/64790/HTML/default/viewer.htm#n0p2fmevfgj470n17h4k9f27qjag.htm&amp;nbsp;" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/leforinforref/64790/HTML/default/viewer.htm#n0p2fmevfgj470n17h4k9f27qjag.htm&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You&amp;nbsp;best stick to one of the OOTB formats from above BUT if you really must then you can also create your own picture format (using Proc Format). The disadvantage of this: You need to ensure that this format is available whenever you use it so you either store it in a permanent catalog and add the catalog to the format search path (option FMTSEARCH) or you ensure that the code creating the picture format gets always executed when you use the format. ...but: if then storing the data in a permanent table with the format assigned to the variable you still will need the format itself stored in a permanent catalog.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 03:14:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extracting-Created-date-from-csv-file/m-p/499761#M32112</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-09-28T03:14:45Z</dc:date>
    </item>
  </channel>
</rss>

