<?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: Import data from Excel and then converting into defined variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-Excel-and-then-converting-into-defined-variable/m-p/384092#M91655</link>
    <description>&lt;P&gt;I'm using VM.... but time there is set&amp;nbsp;correctly... However the tab with &lt;STRONG&gt;internet time&amp;nbsp;&lt;/STRONG&gt;that was showing &lt;STRONG&gt;25SEP2017&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess this is why SAS is unable to capture correct date. Thanks for heads up.&lt;/P&gt;</description>
    <pubDate>Sun, 30 Jul 2017 18:17:32 GMT</pubDate>
    <dc:creator>ab12nov</dc:creator>
    <dc:date>2017-07-30T18:17:32Z</dc:date>
    <item>
      <title>Import data from Excel and then converting into defined variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-Excel-and-then-converting-into-defined-variable/m-p/384087#M91652</link>
      <description>&lt;P&gt;Hi guys can you help me with the querry&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile = 'C:\Documents and Settings\Administrator\Desktop\SAS\Excels_for_import\SASTopics_xls.xls'
out = SasTopic DBMS = excel;
range = "quick$";
run;

data SasUpdate;
set SasTopic;
Estimateddate = input(Date,date9.);
if Estimateddate &amp;lt; today() then
Status = 'Complete';
else 
Status = 'incomplete';
format Estimateddate date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The log window error : &lt;STRONG&gt;Invalid argument to function INPUT at line 164 column 17&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;The estimateddate variable is not getting formatted and &lt;STRONG&gt;today()&lt;/STRONG&gt; function is returning date of &lt;STRONG&gt;27SEP1997&lt;/STRONG&gt; not today's date.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jul 2017 17:51:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-Excel-and-then-converting-into-defined-variable/m-p/384087#M91652</guid>
      <dc:creator>ab12nov</dc:creator>
      <dc:date>2017-07-30T17:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from Excel and then converting into defined variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-Excel-and-then-converting-into-defined-variable/m-p/384089#M91653</link>
      <description>&lt;P&gt;First of all, the today() function WILL return today's date, unless your computer's hardware clock is set to a wrong date.&lt;/P&gt;
&lt;P&gt;Inspect your date column in the imported dataset. I am very sure that it will not contain a date in the SAS date9 format, so you have to find the correct informat for your values.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jul 2017 18:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-Excel-and-then-converting-into-defined-variable/m-p/384089#M91653</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-30T18:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from Excel and then converting into defined variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-Excel-and-then-converting-into-defined-variable/m-p/384090#M91654</link>
      <description>&lt;P&gt;Post a proc contents of your dataset after you import it, as well as your full log.&lt;/P&gt;
&lt;P&gt;It's likely the date is being imported as a SAS data already.&amp;nbsp;&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/155414"&gt;@ab12nov&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi guys can you help me with the querry&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile = 'C:\Documents and Settings\Administrator\Desktop\SAS\Excels_for_import\SASTopics_xls.xls'
out = SasTopic DBMS = excel;
range = "quick$";
run;

data SasUpdate;
set SasTopic;
Estimateddate = input(Date,date9.);
if Estimateddate &amp;lt; today() then
Status = 'Complete';
else 
Status = 'incomplete';
format Estimateddate date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The log window error : &lt;STRONG&gt;Invalid argument to function INPUT at line 164 column 17&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;The estimateddate variable is not getting formatted and &lt;STRONG&gt;today()&lt;/STRONG&gt; function is returning date of &lt;STRONG&gt;27SEP1997&lt;/STRONG&gt; not today's date.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jul 2017 18:03:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-Excel-and-then-converting-into-defined-variable/m-p/384090#M91654</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-30T18:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from Excel and then converting into defined variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-Excel-and-then-converting-into-defined-variable/m-p/384092#M91655</link>
      <description>&lt;P&gt;I'm using VM.... but time there is set&amp;nbsp;correctly... However the tab with &lt;STRONG&gt;internet time&amp;nbsp;&lt;/STRONG&gt;that was showing &lt;STRONG&gt;25SEP2017&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess this is why SAS is unable to capture correct date. Thanks for heads up.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jul 2017 18:17:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-Excel-and-then-converting-into-defined-variable/m-p/384092#M91655</guid>
      <dc:creator>ab12nov</dc:creator>
      <dc:date>2017-07-30T18:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from Excel and then converting into defined variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-Excel-and-then-converting-into-defined-variable/m-p/384093#M91656</link>
      <description>&lt;P&gt;Are you using a legitimate&amp;nbsp;version of SAS. I've seen people use torrented versions which require setting back the date which would cause the issue you're seeing with date.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's a free version of SAS available for learning purposes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're using a legitimate version of SAS this comment does not apply :).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jul 2017 18:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-Excel-and-then-converting-into-defined-variable/m-p/384093#M91656</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-30T18:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from Excel and then converting into defined variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-Excel-and-then-converting-into-defined-variable/m-p/384095#M91657</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you said, while seeing the date variable in content it was already formatted, so didn't have to format it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Secondly, I'm quite sure the product is legit. My&amp;nbsp;organisation has provided me the software. It is the system issue. So I'll have to reach out Tech guys. Although I ask about the version of SAS that is legit or not. Thanks for the update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Ayushmaan&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jul 2017 18:32:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-Excel-and-then-converting-into-defined-variable/m-p/384095#M91657</guid>
      <dc:creator>ab12nov</dc:creator>
      <dc:date>2017-07-30T18:32:02Z</dc:date>
    </item>
  </channel>
</rss>

