<?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: Create date with year month and day in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563631#M10916</link>
    <description>&lt;P&gt;If the values really look like that then the DATE informat should work, just make sure to use a long enough width.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;aestdat_date = input(aestdat_raw,date11.);
format aestdat_date yymmdd10.;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2019 01:27:25 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-06-05T01:27:25Z</dc:date>
    <item>
      <title>Create date with year month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563624#M10911</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;below is my data:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="snip 1.PNG" style="width: 267px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29987iD57E867C06943B1B/image-size/large?v=v2&amp;amp;px=999" role="button" title="snip 1.PNG" alt="snip 1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create above dates in ISO date format like 2019-02-28 &amp;amp; 2019-03-18.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me with this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Adithya&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 00:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563624#M10911</guid>
      <dc:creator>chinna0369</dc:creator>
      <dc:date>2019-06-05T00:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create date with year month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563625#M10912</link>
      <description>Got it below is my code:&lt;BR /&gt;want=input(AESTDAT_RAW,anydtdte20.);&lt;BR /&gt;format want yymmdd10.;&lt;BR /&gt;Thanks!</description>
      <pubDate>Wed, 05 Jun 2019 00:25:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563625#M10912</guid>
      <dc:creator>chinna0369</dc:creator>
      <dc:date>2019-06-05T00:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create date with year month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563626#M10913</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is that variable a string or a SAS numeric date? Do you want the variable to be a SAS date or a string?&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it is a numeric, then you just have to change the format of that column to yymmdd10.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it is a string, then you have to use an input function to translate it to a SAS date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	aestdat_raw = "28 feb 2019";
run;

data want;
	set have;
	aestdat_date = input (compress(aestdat_raw), date9.); *Use compress to remove the spaces, or you will get the year 2020!;
	format aestdat_date yymmdd10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jun 2019 00:25:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563626#M10913</guid>
      <dc:creator>heffo</dc:creator>
      <dc:date>2019-06-05T00:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create date with year month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563627#M10914</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;got it below is my code for my question:&lt;/P&gt;&lt;P&gt;want=input(AESTDAT_RAW,anydtdte20.);&lt;BR /&gt;format want yymmdd10.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 00:25:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563627#M10914</guid>
      <dc:creator>chinna0369</dc:creator>
      <dc:date>2019-06-05T00:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create date with year month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563628#M10915</link>
      <description>I'm always a bit careful with the anydate type of formats. It might still get it wrong and the default setting might be different when you run it from your own computer and if it is later ran on the server as a job.</description>
      <pubDate>Wed, 05 Jun 2019 00:27:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563628#M10915</guid>
      <dc:creator>heffo</dc:creator>
      <dc:date>2019-06-05T00:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create date with year month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563631#M10916</link>
      <description>&lt;P&gt;If the values really look like that then the DATE informat should work, just make sure to use a long enough width.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;aestdat_date = input(aestdat_raw,date11.);
format aestdat_date yymmdd10.;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 01:27:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563631#M10916</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-06-05T01:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create date with year month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563640#M10918</link>
      <description>&lt;P&gt;We have a Table with a date in format MMM-19.&amp;nbsp; Example MAY-19.&amp;nbsp; Is there a way to generate a new sortable date column from this format?&amp;nbsp; Preferably 2019-05-31 in this example.&amp;nbsp; Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The last date in the month would be preferred.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 05:41:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563640#M10918</guid>
      <dc:creator>jskarda</dc:creator>
      <dc:date>2019-06-05T05:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create date with year month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563922#M10959</link>
      <description>&lt;P&gt;You should create your own thread instead, but here is an example that works if the date is an actual string and not just a formatted numeric value. If it is numeric to begin with, just use the intnx function.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
	date_s = "MAY-19";
	date_n = input(compress(date_s,"-"),monyy.);
	end_date_n = intnx ('month',date_n,0,'E');
	format date_n end_date_n yymmdd10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jun 2019 23:38:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563922#M10959</guid>
      <dc:creator>heffo</dc:creator>
      <dc:date>2019-06-05T23:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create date with year month and day</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563997#M10976</link>
      <description>So if I wish to use this command, will this work? I tried and received an error.&lt;BR /&gt;I wish to use SL_FSCL_PERIOD to generate a new column named SL_FSCL_PERIOD_DT.&lt;BR /&gt;&lt;BR /&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE RXFFDM.ORCL_SL_JE_DTL_DT AS&lt;BR /&gt;SELECT *,&lt;BR /&gt;put(intnx ('month',SL_FSCL_PERIOD,0,'E')) format=yymmdd10. as SL_FSCL_PERIOD_DT&lt;BR /&gt;FROM RXFFDM.ORCL_SL_JE_DTL;&lt;BR /&gt;Quit;&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Jun 2019 09:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-date-with-year-month-and-day/m-p/563997#M10976</guid>
      <dc:creator>jskarda</dc:creator>
      <dc:date>2019-06-06T09:09:59Z</dc:date>
    </item>
  </channel>
</rss>

