<?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 Want to enter date value in the created date variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491073#M128684</link>
    <description>&lt;P&gt;I have a multi variable data set. From that data set I am creating new data set with some specific variables and one new Date variable at the end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The newly created Date Variable should contain week ending date. Below is the code i am writing to enter week ending date value, but when i open the data set the week ending date shows the "01/01/1960". Can someone guide me on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;set existing (keep = list of variables i which WEDATE varibale is created);&lt;/P&gt;&lt;P&gt;if missing(wedate) then wedate = "08/17/2018";&lt;/P&gt;&lt;P&gt;else if wedate = "08/17/2018";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Aug 2018 04:17:54 GMT</pubDate>
    <dc:creator>nishSAS</dc:creator>
    <dc:date>2018-08-30T04:17:54Z</dc:date>
    <item>
      <title>Want to enter date value in the created date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491073#M128684</link>
      <description>&lt;P&gt;I have a multi variable data set. From that data set I am creating new data set with some specific variables and one new Date variable at the end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The newly created Date Variable should contain week ending date. Below is the code i am writing to enter week ending date value, but when i open the data set the week ending date shows the "01/01/1960". Can someone guide me on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;set existing (keep = list of variables i which WEDATE varibale is created);&lt;/P&gt;&lt;P&gt;if missing(wedate) then wedate = "08/17/2018";&lt;/P&gt;&lt;P&gt;else if wedate = "08/17/2018";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 04:17:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491073#M128684</guid>
      <dc:creator>nishSAS</dc:creator>
      <dc:date>2018-08-30T04:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Want to enter date value in the created date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491075#M128686</link>
      <description>&lt;P&gt;assuming you are not representing as sas date constant and weddate is numeric sas date variable, the code may likely be&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test;&lt;/P&gt;
&lt;P&gt;set existing (keep = list of variables i which WEDATE varibale is created);&lt;/P&gt;
&lt;P&gt;if missing(wedate) then wedate ="17aug2018"d ;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 04:25:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491075#M128686</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-30T04:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Want to enter date value in the created date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491078#M128687</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;the given solutions&amp;nbsp;is correct but i required the WEDATE in "mm/dd/yyyy" format. So for that i am using numeric value.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 04:31:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491078#M128687</guid>
      <dc:creator>nishSAS</dc:creator>
      <dc:date>2018-08-30T04:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Want to enter date value in the created date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491083#M128692</link>
      <description>&lt;P&gt;"scratching my head"&lt;/P&gt;
&lt;P&gt;Do you mean you want to assign mmddyyyy format for your numeric sas dates for display?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 04:49:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491083#M128692</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-30T04:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Want to enter date value in the created date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491113#M128715</link>
      <description>&lt;P&gt;You know the difference between the formatted (displayed) value of a variable the the actual value?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If WEDATE is a sas date variable, that is a numeric variable with a date-format, than you must use "17aug2018"d to check if that date is stored in the variable, regardless of the date-format assigned to WEDATE.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 06:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491113#M128715</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-08-30T06:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Want to enter date value in the created date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491117#M128718</link>
      <description>&lt;P&gt;No matter how a SAS date variable is &lt;EM&gt;displayed&lt;/EM&gt;, SAS date literals in code are always written in the format "ddmmmyyyy"d, where mmm is the abbreviated name of the month.&lt;/P&gt;
&lt;P&gt;If you want the SAS date variable to display as mm/dd/yyyy, assign it the MMDDYY10. display format.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 07:21:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491117#M128718</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-30T07:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Want to enter date value in the created date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491189#M128755</link>
      <description>&lt;P&gt;sorry for confusion but you are right i want the value in WEDATE variable in MM/DD/YYYY format&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 12:19:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491189#M128755</guid>
      <dc:creator>nishSAS</dc:creator>
      <dc:date>2018-08-30T12:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Want to enter date value in the created date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491204#M128760</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/224236"&gt;@nishSAS&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;sorry for confusion but you are right i want the value in WEDATE variable in MM/DD/YYYY format&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format wedate mmddyy10.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That's all you need.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 12:44:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491204#M128760</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-30T12:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Want to enter date value in the created date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491210#M128763</link>
      <description>&lt;P&gt;yes right&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 12:54:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-enter-date-value-in-the-created-date-variable/m-p/491210#M128763</guid>
      <dc:creator>nishSAS</dc:creator>
      <dc:date>2018-08-30T12:54:46Z</dc:date>
    </item>
  </channel>
</rss>

