<?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: can anyone solve this problem? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-date-value-from-raw-data-DD-MM-YYYY/m-p/811408#M320036</link>
    <description>&lt;P&gt;&lt;STRONG&gt;INFORMAT&lt;/STRONG&gt; tells SAS how to interpret/read a raw value as it appears in the input source.&amp;nbsp;&lt;STRONG&gt;FORMAT&lt;/STRONG&gt; tells SAS how to display a raw value for appearance purposes. In this program you need both. I used DDMMYY10 here to match the input layout, but you could use DATE9. (ex: 08APR2022) if you prefer, as many people do with SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;data kvb;
input date withdraw balance;
informat date ddmmyy10.;
format date ddmmyy10.;
datalines;
01-04-2022 . 671.00
08-04-2022 36.00 635.00
11-04-2022 72.00 563.00
16-04-2022 20.00 543.00
27-04-2022 30.00 513.00
27-04-2022 10.00 503.00
29-04-2022 75.00 428.00
29-04-2022 11.00 417.00
30-04-2022 . 517.0
;
run;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 May 2022 11:05:43 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2022-05-04T11:05:43Z</dc:date>
    <item>
      <title>Reading a date value from raw data - DD-MM-YYYY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-date-value-from-raw-data-DD-MM-YYYY/m-p/811374#M320016</link>
      <description>&lt;PRE&gt;&lt;CODE class=""&gt;data kvb;

input date  withdraw balance;
datalines;

01-04-2022   .     671.00
08-04-2022  36.00 635.00
11-04-2022 72.00  563.00
16-04-2022 20.00  543.00
27-04-2022  30.00 513.00
27-04-2022  10.00 503.00
29-04-2022 75.00  428.00
29-04-2022  11.00 417.00
30-04-2022     .   517.0
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (2).png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71129i9B118E316E3F822A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (2).png" alt="Screenshot (2).png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 13:31:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-date-value-from-raw-data-DD-MM-YYYY/m-p/811374#M320016</guid>
      <dc:creator>learner3</dc:creator>
      <dc:date>2022-05-04T13:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: can anyone solve this problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-date-value-from-raw-data-DD-MM-YYYY/m-p/811375#M320017</link>
      <description>&lt;P&gt;You need to supply an informat to your date field.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 07:13:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-date-value-from-raw-data-DD-MM-YYYY/m-p/811375#M320017</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-05-04T07:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: can anyone solve this problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-date-value-from-raw-data-DD-MM-YYYY/m-p/811378#M320020</link>
      <description>i tried&lt;BR /&gt;&lt;BR /&gt;data kvb;&lt;BR /&gt;input date withdraw balance;&lt;BR /&gt;informat date ddmmyy10.;&lt;BR /&gt;datalines;&lt;BR /&gt;&lt;BR /&gt;01-04-2022 . 671.00&lt;BR /&gt;08-04-2022 36.00 635.00&lt;BR /&gt;11-04-2022 72.00 563.00&lt;BR /&gt;16-04-2022 20.00 543.00&lt;BR /&gt;27-04-2022 30.00 513.00&lt;BR /&gt;27-04-2022 10.00 503.00&lt;BR /&gt;29-04-2022 75.00 428.00&lt;BR /&gt;29-04-2022 11.00 417.00&lt;BR /&gt;30-04-2022 . 517.0&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 May 2022 07:18:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-date-value-from-raw-data-DD-MM-YYYY/m-p/811378#M320020</guid>
      <dc:creator>learner3</dc:creator>
      <dc:date>2022-05-04T07:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: can anyone solve this problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-date-value-from-raw-data-DD-MM-YYYY/m-p/811379#M320021</link>
      <description>in output i got this&lt;BR /&gt;1 22736 . 671&lt;BR /&gt;2 22743 36 635&lt;BR /&gt;3 22746 72 563&lt;BR /&gt;4 22751 20 543&lt;BR /&gt;5 22762 30 513&lt;BR /&gt;6 22762 10 503&lt;BR /&gt;7 22764 75 428&lt;BR /&gt;8 22764 11 417&lt;BR /&gt;9 22765 . 517&lt;BR /&gt;</description>
      <pubDate>Wed, 04 May 2022 07:21:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-date-value-from-raw-data-DD-MM-YYYY/m-p/811379#M320021</guid>
      <dc:creator>learner3</dc:creator>
      <dc:date>2022-05-04T07:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: can anyone solve this problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-date-value-from-raw-data-DD-MM-YYYY/m-p/811382#M320025</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/421544"&gt;@learner3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;in output i got this&lt;BR /&gt;1 22736 . 671&lt;BR /&gt;2 22743 36 635&lt;BR /&gt;3 22746 72 563&lt;BR /&gt;4 22751 20 543&lt;BR /&gt;5 22762 30 513&lt;BR /&gt;6 22762 10 503&lt;BR /&gt;7 22764 75 428&lt;BR /&gt;8 22764 11 417&lt;BR /&gt;9 22765 . 517&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Exactly as expected, if you don't attach a format to a variable that could be a date, the number of days since 01Jan1960 is displayed.&lt;/P&gt;
&lt;P&gt;Reading the docs about sas-dates is recommended before working with sas.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 07:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-date-value-from-raw-data-DD-MM-YYYY/m-p/811382#M320025</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-05-04T07:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: can anyone solve this problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-date-value-from-raw-data-DD-MM-YYYY/m-p/811408#M320036</link>
      <description>&lt;P&gt;&lt;STRONG&gt;INFORMAT&lt;/STRONG&gt; tells SAS how to interpret/read a raw value as it appears in the input source.&amp;nbsp;&lt;STRONG&gt;FORMAT&lt;/STRONG&gt; tells SAS how to display a raw value for appearance purposes. In this program you need both. I used DDMMYY10 here to match the input layout, but you could use DATE9. (ex: 08APR2022) if you prefer, as many people do with SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;data kvb;
input date withdraw balance;
informat date ddmmyy10.;
format date ddmmyy10.;
datalines;
01-04-2022 . 671.00
08-04-2022 36.00 635.00
11-04-2022 72.00 563.00
16-04-2022 20.00 543.00
27-04-2022 30.00 513.00
27-04-2022 10.00 503.00
29-04-2022 75.00 428.00
29-04-2022 11.00 417.00
30-04-2022 . 517.0
;
run;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 11:05:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-date-value-from-raw-data-DD-MM-YYYY/m-p/811408#M320036</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2022-05-04T11:05:43Z</dc:date>
    </item>
  </channel>
</rss>

