<?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 SAS Date code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-code/m-p/231266#M42046</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am unable to get the proper output. My data is in csv format ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options yearcutoff=1920 pagesize=60 linesize=80 pageno=1;&lt;BR /&gt;libname vicone '/folders/myfolders/';&lt;BR /&gt;data vicone.tourdates;&lt;BR /&gt;length City $ 11 ;&lt;BR /&gt;infile '/folders/myfolders/Working with dates/tourdates.csv' dlm=',' dsd firstobs=2;&lt;BR /&gt;input City $ DepartureDate date11. Nights;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=vicone.tourdates;&lt;BR /&gt;title 'Tour Departure Dates as SAS Date Values';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please help me out!!!!!!!!!!!!!!!!!&lt;/P&gt;</description>
    <pubDate>Thu, 22 Oct 2015 21:06:18 GMT</pubDate>
    <dc:creator>Yogi1</dc:creator>
    <dc:date>2015-10-22T21:06:18Z</dc:date>
    <item>
      <title>SAS Date code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-code/m-p/231266#M42046</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am unable to get the proper output. My data is in csv format ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options yearcutoff=1920 pagesize=60 linesize=80 pageno=1;&lt;BR /&gt;libname vicone '/folders/myfolders/';&lt;BR /&gt;data vicone.tourdates;&lt;BR /&gt;length City $ 11 ;&lt;BR /&gt;infile '/folders/myfolders/Working with dates/tourdates.csv' dlm=',' dsd firstobs=2;&lt;BR /&gt;input City $ DepartureDate date11. Nights;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=vicone.tourdates;&lt;BR /&gt;title 'Tour Departure Dates as SAS Date Values';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please help me out!!!!!!!!!!!!!!!!!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2015 21:06:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-code/m-p/231266#M42046</guid>
      <dc:creator>Yogi1</dc:creator>
      <dc:date>2015-10-22T21:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-code/m-p/231277#M42050</link>
      <description>&lt;P&gt;Hello - Please try this.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc import datafile="/folders/myfolders/data/tourdates"&lt;BR /&gt; out=work.in1 &lt;BR /&gt; DBMS=xlsx&lt;BR /&gt; ;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=work.in1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;printed this o/p&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="table"&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;Obs&lt;/TH&gt;
&lt;TH class="header" scope="col"&gt;Country&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;DepartureDate&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Nights&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="data"&gt;New Zealand&lt;/TD&gt;
&lt;TD class="r data"&gt;03FEB2001&lt;/TD&gt;
&lt;TD class="r data"&gt;16&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;2&lt;/TH&gt;
&lt;TD class="data"&gt;japan&lt;/TD&gt;
&lt;TD class="r data"&gt;13MAY2000&lt;/TD&gt;
&lt;TD class="r data"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;3&lt;/TH&gt;
&lt;TD class="data"&gt;Greece&lt;/TD&gt;
&lt;TD class="r data"&gt;17OCT1999&lt;/TD&gt;
&lt;TD class="r data"&gt;12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;4&lt;/TH&gt;
&lt;TD class="data"&gt;Brazil&lt;/TD&gt;
&lt;TD class="r data"&gt;28FEB2001&lt;/TD&gt;
&lt;TD class="r data"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;5&lt;/TH&gt;
&lt;TD class="data"&gt;Venezuela&lt;/TD&gt;
&lt;TD class="r data"&gt;10NOV2000&lt;/TD&gt;
&lt;TD class="r data"&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;6&lt;/TH&gt;
&lt;TD class="data"&gt;Italy&lt;/TD&gt;
&lt;TD class="r data"&gt;25APR2001&lt;/TD&gt;
&lt;TD class="r data"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;7&lt;/TH&gt;
&lt;TD class="data"&gt;Russia&lt;/TD&gt;
&lt;TD class="r data"&gt;03JUN1997&lt;/TD&gt;
&lt;TD class="r data"&gt;14&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;8&lt;/TH&gt;
&lt;TD class="data"&gt;Switzerland&lt;/TD&gt;
&lt;TD class="r data"&gt;14JAN2001&lt;/TD&gt;
&lt;TD class="r data"&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;9&lt;/TH&gt;
&lt;TD class="data"&gt;Austarlia&lt;/TD&gt;
&lt;TD class="r data"&gt;24OCT1998&lt;/TD&gt;
&lt;TD class="r data"&gt;12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;10&lt;/TH&gt;
&lt;TD class="data"&gt;Ireland&lt;/TD&gt;
&lt;TD class="r data"&gt;27AUG2000&lt;/TD&gt;
&lt;TD class="r data"&gt;7&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps. Good luck...!!!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2015 22:39:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-code/m-p/231277#M42050</guid>
      <dc:creator>kannand</dc:creator>
      <dc:date>2015-10-22T22:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-code/m-p/231314#M42064</link>
      <description>&lt;P&gt;You are using CSV engine in your code, however the file is XLSX. &amp;nbsp;As a recommendation, due to Excel being unstructured and unsuitable as a data capture or transfer format, I would suggest that you first save the data to CSV - do this by going to File-&amp;gt;SaveAs, and choose CSV from the file options (or better yet, get the author of the data to use a proper system in the first place). &amp;nbsp;AS you are going from Excel to another format, you will then need to check the data is correct, Excel can have different formats, types, special characters etc. in each cell (hence why it is not a good format). &amp;nbsp;Once the data is in a proper data transfer format then its simply a matter of writing a datastep import program (not proc import which is a guessing function - you know your data, you specify it):&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; infile "...your_file.csv" dlm=",";&lt;/P&gt;
&lt;P&gt;&amp;nbsp; informat ....;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; format ...;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; length ...;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; label ...;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; input ...;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 08:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-code/m-p/231314#M42064</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-10-23T08:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-code/m-p/231326#M42068</link>
      <description>&lt;P&gt;Great insight. Thanks for your input RW9&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 11:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-code/m-p/231326#M42068</guid>
      <dc:creator>kannand</dc:creator>
      <dc:date>2015-10-23T11:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-code/m-p/231375#M42081</link>
      <description>&lt;P&gt;Thankyou So much.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 15:50:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-code/m-p/231375#M42081</guid>
      <dc:creator>Yogi1</dc:creator>
      <dc:date>2015-10-23T15:50:39Z</dc:date>
    </item>
  </channel>
</rss>

