<?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: Read a date from Excel File in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Read-a-date-from-Excel-File/m-p/143583#M918</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you give example of your data in the excel. how the date cell data look?&lt;/P&gt;&lt;P&gt;And what the output you are getting now?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 Sep 2014 00:11:24 GMT</pubDate>
    <dc:creator>mohamed_zaki</dc:creator>
    <dc:date>2014-09-13T00:11:24Z</dc:date>
    <item>
      <title>Read a date from Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Read-a-date-from-Excel-File/m-p/143582#M917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #333333; background-color: #f0fade;"&gt;How to read date from Excel File&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #333333; background-color: #f0fade;"&gt;I am importing data from excel file, but I was unable to let SAS read the Date column.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #333333; background-color: #f0fade;"&gt;Can anyone kindly help me to solve this issue? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 00:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Read-a-date-from-Excel-File/m-p/143582#M917</guid>
      <dc:creator>boas3ad</dc:creator>
      <dc:date>2014-09-13T00:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Read a date from Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Read-a-date-from-Excel-File/m-p/143583#M918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you give example of your data in the excel. how the date cell data look?&lt;/P&gt;&lt;P&gt;And what the output you are getting now?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 00:11:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Read-a-date-from-Excel-File/m-p/143583#M918</guid>
      <dc:creator>mohamed_zaki</dc:creator>
      <dc:date>2014-09-13T00:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Read a date from Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Read-a-date-from-Excel-File/m-p/143584#M919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your replay&lt;/P&gt;&lt;P&gt;It is a time series data for stocks returns for different markets. the first column is dates in format mm/dd/yyyy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing an event study, so I need to use the dates.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 00:37:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Read-a-date-from-Excel-File/m-p/143584#M919</guid>
      <dc:creator>boas3ad</dc:creator>
      <dc:date>2014-09-13T00:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Read a date from Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Read-a-date-from-Excel-File/m-p/143585#M920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What gets imported into SAS? Make sure your Excel dates are real dates (numbers with a date format) and not character strings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 00:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Read-a-date-from-Excel-File/m-p/143585#M920</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-09-13T00:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Read a date from Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Read-a-date-from-Excel-File/m-p/143586#M921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;This demo showcases how to import Excel data to SAS using SAS Enterprise Guide: &lt;A class="active_link" href="https://www.youtube.com/watch?v=LHmKkkwMXpU"&gt;https://www.youtube.com/watch?v=LHmKkkwMXpU&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As &lt;A __default_attr="2746" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; pointed out already you will have to deal with some format conversion most likely. If you can share how you are reading data from Excel or ideally provide an example of your spreadsheet, we might be able to provide further advise.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Udo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 12:47:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Read-a-date-from-Excel-File/m-p/143586#M921</guid>
      <dc:creator>udo_sas</dc:creator>
      <dc:date>2014-09-15T12:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Read a date from Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Read-a-date-from-Excel-File/m-p/143587#M922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi boas3ad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the date has been entered on the Excel spreadsheet as a character string, you need to specify in the input statement as a character string, then convert to date as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;labdt = input(lab_date,date9.); format labdt date9.; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also note that Excel and SAS having different reference dates (i.e. Day 0 in SAS is 1 January 1960 and Day 0 in Excel is 1 January 1900), Use below formulaes to get the date time correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SAS_date = Excel_date - 21916;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt; SAS_time = Excel_time * 86400;&lt;/LI&gt;&lt;LI&gt; SAS_date_time = (Excel_date_time - 21916) * 86400;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Daman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 13:03:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Read-a-date-from-Excel-File/m-p/143587#M922</guid>
      <dc:creator>damanaulakh88</dc:creator>
      <dc:date>2014-09-15T13:03:31Z</dc:date>
    </item>
  </channel>
</rss>

