<?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: date format in proc sql in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-in-proc-sql/m-p/270297#M18745</link>
    <description>&lt;P&gt;You can always change these format after importing into SAS.&lt;/P&gt;
&lt;P&gt;Assuming all the table stored at WORK library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let lib=work;

data _null_;
 set sashelp.vcolumn(where=(libname="%upcase(&amp;amp;lib)" and format='DATE9.')) end=last;
 by memname;
 if _n_=1 then call execute(catt("proc datasets library=&amp;amp;lib nolist nodetails;"));
 if first.memname then call execute(catx(" ","modify ",memname,"; format"));
 call execute(catx(" ",name," yymmdd10."));
 if last.memname then call execute(";");
 if last then call execute("quit;");
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 13 May 2016 09:20:09 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-05-13T09:20:09Z</dc:date>
    <item>
      <title>date format in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-in-proc-sql/m-p/270274#M18743</link>
      <description>&lt;P&gt;I execute the proc sql pass through (Teradata to SAS).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#242729"&gt;&lt;FONT face="Consolas" size="2"&gt;%let sql=select current_date from sys_calendar.calendar&lt;/FONT&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;proc sql noprint; &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;CONNECT TO TERADATA(Authdomain= SERVER= mode=); &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;CREATE table &amp;amp;number AS SELECT * FROM CONNECTION TO TERADATA (&amp;amp;sql.);&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;DISCONNECT FROM TERADATA; QUIT;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem because I am seeing date format as DATEw. but I need format 'YYYY-MM-DD'.&lt;/P&gt;&lt;P&gt;I know I can do that:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;a,&amp;nbsp;period_date format=yymmdd10. as c, b&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; CONNECTION TO TERADATA&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have a date format: 13MAY2016, but I need: '2016-05-12' but I have about 150 sqls, so I prefer a more global solution than a new format for each sql. Can I use some options?&amp;nbsp;I need the same for each date, so I wolud like do that in global way.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2016 06:55:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-in-proc-sql/m-p/270274#M18743</guid>
      <dc:creator>aola</dc:creator>
      <dc:date>2016-05-13T06:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: date format in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-in-proc-sql/m-p/270291#M18744</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/72630"&gt;@aola﻿&lt;/a&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use SASDATEFMT option like that in your query;&lt;/P&gt;&lt;PRE&gt;( sasdatefmt=( date1='datetime21.') )&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the link for more info:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001371624.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001371624.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2016 08:57:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-in-proc-sql/m-p/270291#M18744</guid>
      <dc:creator>Kalind_Patel</dc:creator>
      <dc:date>2016-05-13T08:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: date format in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-in-proc-sql/m-p/270297#M18745</link>
      <description>&lt;P&gt;You can always change these format after importing into SAS.&lt;/P&gt;
&lt;P&gt;Assuming all the table stored at WORK library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let lib=work;

data _null_;
 set sashelp.vcolumn(where=(libname="%upcase(&amp;amp;lib)" and format='DATE9.')) end=last;
 by memname;
 if _n_=1 then call execute(catt("proc datasets library=&amp;amp;lib nolist nodetails;"));
 if first.memname then call execute(catx(" ","modify ",memname,"; format"));
 call execute(catx(" ",name," yymmdd10."));
 if last.memname then call execute(";");
 if last then call execute("quit;");
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 May 2016 09:20:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-in-proc-sql/m-p/270297#M18745</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-05-13T09:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: date format in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-in-proc-sql/m-p/270302#M18746</link>
      <description>&lt;P&gt;Thank you, you're amazing &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2016 09:25:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-in-proc-sql/m-p/270302#M18746</guid>
      <dc:creator>aola</dc:creator>
      <dc:date>2016-05-13T09:25:48Z</dc:date>
    </item>
  </channel>
</rss>

