<?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 informat MMDDYY10. incorrect? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134420#M260891</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone. I recently ran into a 'feature' of SAS that I actually never noticed in a little over 2 years using the system.&amp;nbsp; Noting the error, I am actually not sure how to handle it going forward, so any help and ideas would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I am reading from a csv file one field, called "date1".&amp;nbsp; I am reading the field as an Informat Date1 MMDDYY10.&amp;nbsp; as I am expecting the date to come in a known date format of 03/18/2015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, one day the users sent me a file with the following in the date field. "41974".&amp;nbsp; What happened is the users got their data from Excel, and accidentally formatted the date field as "numeric", and 41,974 is the number of days between 1-1-1900 and "12-1-2014"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when SAS read this number in, it actually produced the value "April 19 1974".&amp;nbsp; I was pretty shocked at this, but looking back I realize why it would do this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, what informat would I use to get around this problem?&amp;nbsp; I can't use MMDDYY10. anymore, since it incorrectly reads in numbers above as dates....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any and all help would be appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jan 2015 21:42:17 GMT</pubDate>
    <dc:creator>Anotherdream</dc:creator>
    <dc:date>2015-01-22T21:42:17Z</dc:date>
    <item>
      <title>Date informat MMDDYY10. incorrect?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134420#M260891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone. I recently ran into a 'feature' of SAS that I actually never noticed in a little over 2 years using the system.&amp;nbsp; Noting the error, I am actually not sure how to handle it going forward, so any help and ideas would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I am reading from a csv file one field, called "date1".&amp;nbsp; I am reading the field as an Informat Date1 MMDDYY10.&amp;nbsp; as I am expecting the date to come in a known date format of 03/18/2015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, one day the users sent me a file with the following in the date field. "41974".&amp;nbsp; What happened is the users got their data from Excel, and accidentally formatted the date field as "numeric", and 41,974 is the number of days between 1-1-1900 and "12-1-2014"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when SAS read this number in, it actually produced the value "April 19 1974".&amp;nbsp; I was pretty shocked at this, but looking back I realize why it would do this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, what informat would I use to get around this problem?&amp;nbsp; I can't use MMDDYY10. anymore, since it incorrectly reads in numbers above as dates....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any and all help would be appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 21:42:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134420#M260891</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2015-01-22T21:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Date informat MMDDYY10. incorrect?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134421#M260892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure it's a problem with the informat.&amp;nbsp; It's a change in the way the file was formatted.&amp;nbsp; You'll have to translate excel date to sas date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can put today() in for the date that would work nicely.&amp;nbsp; Depending on frequency and amount of data this might not be a good option but it could be a start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data data2;&lt;/P&gt;&lt;P&gt;infile cards;&lt;/P&gt;&lt;P&gt;informat date1 mmddyy10.;&lt;/P&gt;&lt;P&gt;input date1;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;04/19/1974&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have2;&lt;/P&gt;&lt;P&gt;set data2;&lt;/P&gt;&lt;P&gt;number = intck('day',date1,'18mar2015'd);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want2;&lt;/P&gt;&lt;P&gt;format new_date mmddyy10.;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;new_date = date1 + number;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 21:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134421#M260892</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-01-22T21:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date informat MMDDYY10. incorrect?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134422#M260893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could just use something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input date1 $10.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format datewant date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if anypunct(date1) then datewant=input(date1,anydtdte10.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; else datewant=input(date1,12.)-21916;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;41974&lt;/P&gt;&lt;P&gt;12-1-2014&lt;/P&gt;&lt;P&gt;03/18/2015&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 21:59:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134422#M260893</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-01-22T21:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Date informat MMDDYY10. incorrect?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134423#M260894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DC I think you might have missed the point of my question. I don't want to have to know what the format of the string is coming in at the start of the function... I actually want this file to error out when the value is "41974", or to be smart enough to convert it to the correct date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question was more along the line of "is there a date informat that is smart enough to not try to read this number the way that sas is doing it."&amp;nbsp; There might not be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-status-levels"&gt;&lt;IMG alt="Master" class="jiveImage" src="https://communities.sas.com/5.0.2/images/status/statusicon-51.gif" title="Master" /&gt; &lt;/SPAN&gt;&lt;SPAN class="j-post-author "&gt;&lt;STRONG&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="1088" data-externalid="" data-presence="null" data-userid="149594" data-username="art297" href="https://communities.sas.com/people/art297" id="jive-14959437344157147317186"&gt;Arthur Tabachneck&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;Unfortunately this is part of a production process, so I really need a specific informat so I can grab any format errors into the log I am outputting.. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author "&gt;The reason being, I have code that actually outputs the SAS log to a text file, and then I am scanning that text file for any formatting errors found through the infile statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author "&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author "&gt;Theoritically I could make the change that you noted; if I could figure out how to flag errors into a log (or data_set) somehow.&amp;nbsp; Example: If someone put the value "heyman" into the date field, I would want sas to error on and for me to be able to flag the error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author "&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author "&gt;I might have to just read in all of the dates as varchars in the informats as step 1, and then do your trick with added error flagging as a secondary data-step.....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author "&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author "&gt;I will do a little bit of testing to see if this works for me (regarldess of if it does or not, that's a very nifty solution. Thanks!.... I also especially like the trick of subtracting 21916 (days between 12/31/1899 and 1/1/1960)).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 22:11:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134423#M260894</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2015-01-22T22:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date informat MMDDYY10. incorrect?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134424#M260895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you have to trap errors how about something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input date1 $10.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format datewant date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length error $20;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if count(date1,'/') eq 2 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; datewant=input(date1,?? mmddyy10.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if missing(datewant) then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if anypunct(date1) then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; datewant=input(date1,anydtdte10.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; error='unexpected format';&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if not missing(input(date1,?? 12.)) then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; datewant=input(date1,12.)-21916;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; error='Excel number as date';&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else error='Invalid value';&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;41974&lt;/P&gt;&lt;P&gt;heyman&lt;/P&gt;&lt;P&gt;12-1-2014&lt;/P&gt;&lt;P&gt;03/18/2015&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 22:37:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134424#M260895</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-01-22T22:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Date informat MMDDYY10. incorrect?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134425#M260896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually that difference is 41972&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_ ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; days_between = '01dec2014'd - '01jan1900'd ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp; put days_between= ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp; run ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;days_between=41972&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2015 18:26:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134425#M260896</guid>
      <dc:creator>Howles</dc:creator>
      <dc:date>2015-01-23T18:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date informat MMDDYY10. incorrect?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134426#M260897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="274354" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;: The subtraction to equate Excel date numbers with SAS date numbers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2015 19:23:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134426#M260897</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-01-23T19:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date informat MMDDYY10. incorrect?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134427#M260898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably easiest to read it as character and then add your own logic to validate and convert the value.&amp;nbsp; You can even trap the invalid values and generate you own error messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; datestr &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;$10.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ne input(datestr,??&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;comma32.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;))&amp;nbsp; date=input(datestr,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;comma32.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;)+&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;'01JAN1900'd&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; - &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ne input(datestr,??&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;)) date=input(datestr,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ne input(datestr,??&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;yymmdd10.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;)) date=input(datestr,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;yymmdd10.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ne input(datestr,??&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;ddmmyy10.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;)) date=input(datestr,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;ddmmyy10.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;otherwise&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; date=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; date=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; and datestr ne &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;' '&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'ERROR: Invalid Date String. '&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; datestr=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; date &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (datestr date) (=);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1/1/1965 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;41,974&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;41974&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;Bad Date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2014/01/30&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;30/12/2013&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;;;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2015 23:35:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-informat-MMDDYY10-incorrect/m-p/134427#M260898</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-01-23T23:35:36Z</dc:date>
    </item>
  </channel>
</rss>

