<?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: Excel date conversion in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Excel-date-conversion/m-p/692583#M37331</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/148097"&gt;@Ross12345&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I never have an easy time converting dates in this language.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I imported a set of dates from an excel sheet that follow the form "2016/02/23 18:24:00"&lt;/P&gt;
&lt;P&gt;Once loaded they have the following properties:&lt;/P&gt;
&lt;P&gt;Type: Char&lt;/P&gt;
&lt;P&gt;Len: 27&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to convert them to a workable SAS date format (date9.). I tried a number of approaches without success - online resources aren't super helpful when it comes to SAS date formats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Part of the issue is that "dates" in Excel sometimes aren't. I've had to process files where half the dates were entered as character values. So even Excel couldn't treat them as dates, or more properly, datetime values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might help to share the approaches that did not work and exactly why they didn't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, this is an "online resource" and we get to answer this question in one form or another at least once a week.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Oct 2020 14:46:11 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-10-19T14:46:11Z</dc:date>
    <item>
      <title>Excel date conversion</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Excel-date-conversion/m-p/692578#M37329</link>
      <description>&lt;P&gt;I never have an easy time converting dates in this language.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I imported a set of dates from an excel sheet that follow the form "2016/02/23 18:24:00"&lt;/P&gt;&lt;P&gt;Once loaded they have the following properties:&lt;/P&gt;&lt;P&gt;Type: Char&lt;/P&gt;&lt;P&gt;Len: 27&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to convert them to a workable SAS date format (date9.). I tried a number of approaches without success - online resources aren't super helpful when it comes to SAS date formats.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 14:26:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Excel-date-conversion/m-p/692578#M37329</guid>
      <dc:creator>Ross12345</dc:creator>
      <dc:date>2020-10-19T14:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Excel date conversion</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Excel-date-conversion/m-p/692579#M37330</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data example;
    datetime_char="2016/02/23 18:24:00";
    datetime_want=input(datetime_char,anydtdtm.);
    date_want=datepart(datetime_want);
    format datetime_want datetime18. date_want date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Oct 2020 14:39:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Excel-date-conversion/m-p/692579#M37330</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-10-19T14:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Excel date conversion</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Excel-date-conversion/m-p/692583#M37331</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/148097"&gt;@Ross12345&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I never have an easy time converting dates in this language.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I imported a set of dates from an excel sheet that follow the form "2016/02/23 18:24:00"&lt;/P&gt;
&lt;P&gt;Once loaded they have the following properties:&lt;/P&gt;
&lt;P&gt;Type: Char&lt;/P&gt;
&lt;P&gt;Len: 27&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to convert them to a workable SAS date format (date9.). I tried a number of approaches without success - online resources aren't super helpful when it comes to SAS date formats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Part of the issue is that "dates" in Excel sometimes aren't. I've had to process files where half the dates were entered as character values. So even Excel couldn't treat them as dates, or more properly, datetime values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might help to share the approaches that did not work and exactly why they didn't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, this is an "online resource" and we get to answer this question in one form or another at least once a week.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 14:46:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Excel-date-conversion/m-p/692583#M37331</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-10-19T14:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Excel date conversion</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Excel-date-conversion/m-p/692601#M37333</link>
      <description>&lt;P&gt;Here's a great, but longer and in depth, reference for dates and times in SAS&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/148097"&gt;@Ross12345&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I never have an easy time converting dates in this language.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I imported a set of dates from an excel sheet that follow the form "2016/02/23 18:24:00"&lt;/P&gt;
&lt;P&gt;Once loaded they have the following properties:&lt;/P&gt;
&lt;P&gt;Type: Char&lt;/P&gt;
&lt;P&gt;Len: 27&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to convert them to a workable SAS date format (date9.). I tried a number of approaches without success - online resources aren't super helpful when it comes to SAS date formats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 15:33:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Excel-date-conversion/m-p/692601#M37333</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-10-19T15:33:14Z</dc:date>
    </item>
  </channel>
</rss>

