<?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: need to convert fiinnish date to date9. format in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/need-to-convert-fiinnish-date-to-date9-format/m-p/483042#M31312</link>
    <description>&lt;P&gt;Hi Krut,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the same code which you have sent but still not getting the date in ddmmyy/date9. format.&lt;/P&gt;&lt;P&gt;it gives missing value&lt;/P&gt;</description>
    <pubDate>Wed, 01 Aug 2018 11:39:34 GMT</pubDate>
    <dc:creator>Hema_12</dc:creator>
    <dc:date>2018-08-01T11:39:34Z</dc:date>
    <item>
      <title>need to convert fiinnish date to date9. format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/need-to-convert-fiinnish-date-to-date9-format/m-p/483029#M31310</link>
      <description>&lt;P&gt;i have written this sample code i need to convert this finnish date into date9. format. because when i run actual code trough putty it retrieve the finnish date from server and getting issue while comparing with sysdate9.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options mprint mlogic symbolgen;&lt;BR /&gt;/*options locale=English_unitedstates;*/&lt;BR /&gt;%macro tt;&lt;/P&gt;&lt;P&gt;data one;&lt;BR /&gt;a=%sysfunc(strip('30. heinäkuuta 2018 09:52:06'));&lt;BR /&gt;call symputx('a',a);&lt;BR /&gt;run;&lt;BR /&gt;%put &amp;amp;a;&lt;BR /&gt;/*%let d=%length(&amp;amp;a);*/&lt;BR /&gt;/*%put &amp;amp;d;*/&lt;BR /&gt;%let b=%sysfunc(strip(%sysfunc(substr(&amp;amp;a,1,(%length(&amp;amp;a)-8)))));&lt;BR /&gt;%put &amp;amp;b;&lt;/P&gt;&lt;P&gt;%LET date_d9=%sysfunc(inputn(&amp;amp;b.,nldate10.),date9.);&lt;BR /&gt;%put y=&amp;amp;date_d9.;&lt;BR /&gt;%mend;&lt;BR /&gt;%tt;&lt;/P&gt;&lt;P&gt;********************************************&lt;/P&gt;&lt;P&gt;log--&amp;gt;&lt;/P&gt;&lt;P&gt;MLOGIC(TT): Beginning execution.&lt;BR /&gt;MPRINT(TT): data one;&lt;BR /&gt;MPRINT(TT): a='30. heinäkuuta 2018 09:52:06';&lt;BR /&gt;MPRINT(TT): call symputx('a',a);&lt;BR /&gt;MPRINT(TT): run;&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.ONE has 1 observations and 1 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;MLOGIC(TT): %PUT &amp;amp;a&lt;BR /&gt;SYMBOLGEN: Macro variable A resolves to 30. heinäkuuta 2018 09:52:06&lt;BR /&gt;30. heinäkuuta 2018 09:52:06&lt;BR /&gt;2 The SAS System 12:43 Wednesday, August 1, 2018&lt;/P&gt;&lt;P&gt;MLOGIC(TT): %LET (variable name is B)&lt;BR /&gt;SYMBOLGEN: Macro variable A resolves to 30. heinäkuuta 2018 09:52:06&lt;BR /&gt;SYMBOLGEN: Macro variable A resolves to 30. heinäkuuta 2018 09:52:06&lt;BR /&gt;MLOGIC(TT): %PUT &amp;amp;b&lt;BR /&gt;SYMBOLGEN: Macro variable B resolves to 30. heinäkuuta 2018&lt;BR /&gt;30. heinäkuuta 2018&lt;BR /&gt;MLOGIC(TT): %LET (variable name is DATE_D9)&lt;BR /&gt;SYMBOLGEN: Macro variable B resolves to 30. heinäkuuta 2018&lt;BR /&gt;WARNING: Argument 1 to function INPUTN referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.&lt;BR /&gt;NOTE: Mathematical operations could not be performed during %SYSFUNC function execution. The result of the operations have been set&lt;BR /&gt;to a missing value.&lt;BR /&gt;MLOGIC(TT): %PUT y=&amp;amp;date_d9.&lt;BR /&gt;SYMBOLGEN: Macro variable DATE_D9 resolves to .&lt;BR /&gt;y=.&lt;BR /&gt;MLOGIC(TT): Ending execution.&lt;BR /&gt;42&lt;BR /&gt;43 GOPTIONS NOACCESSIBLE;&lt;BR /&gt;44 %LET _CLIENTTASKLABEL=;&lt;BR /&gt;45 %LET _CLIENTPROCESSFLOWNAME=;&lt;BR /&gt;46 %LET _CLIENTPROJECTPATH=;&lt;BR /&gt;47 %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;48 %LET _SASPROGRAMFILE=;&lt;BR /&gt;49&lt;BR /&gt;50 ;*';*";*/;quit;run;&lt;BR /&gt;51 ODS _ALL_ CLOSE;&lt;BR /&gt;52&lt;BR /&gt;53&lt;BR /&gt;54 QUIT; RUN;&lt;BR /&gt;55&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 10:54:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/need-to-convert-fiinnish-date-to-date9-format/m-p/483029#M31310</guid>
      <dc:creator>Hema_12</dc:creator>
      <dc:date>2018-08-01T10:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: need to convert fiinnish date to date9. format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/need-to-convert-fiinnish-date-to-date9-format/m-p/483039#M31311</link>
      <description>&lt;P&gt;You're out-complicating yourself. Use a sufficient length for the informat, and Bob's your uncle:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options locale=Finnish_Finland;
data one;
a='30. heinäkuuta 2018 09:52:06';
b=strip(substr(a,1,(length(a)-8)));
c=input(b,nldate20.);
format c yymmddd10.;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Aug 2018 11:08:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/need-to-convert-fiinnish-date-to-date9-format/m-p/483039#M31311</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-01T11:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: need to convert fiinnish date to date9. format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/need-to-convert-fiinnish-date-to-date9-format/m-p/483042#M31312</link>
      <description>&lt;P&gt;Hi Krut,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the same code which you have sent but still not getting the date in ddmmyy/date9. format.&lt;/P&gt;&lt;P&gt;it gives missing value&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 11:39:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/need-to-convert-fiinnish-date-to-date9-format/m-p/483042#M31312</guid>
      <dc:creator>Hema_12</dc:creator>
      <dc:date>2018-08-01T11:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: need to convert fiinnish date to date9. format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/need-to-convert-fiinnish-date-to-date9-format/m-p/483047#M31313</link>
      <description>&lt;P&gt;Just use the wanted format:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options locale=Fi_Fi;

data one;
a='30. heinäkuuta 2018 09:52:06';
b=strip(substr(a,1,(length(a)-8)));
c=input(b,nldate20.);
d=c;
format c yymmddd10. d date9.;
run;

proc print data=one noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;             a                           b                      c            d

30. heinäkuuta 2018 09:52:06    30. heinäkuuta 2018    2018-07-30    30JUL2018
&lt;/PRE&gt;
&lt;P&gt;Which format you use, or if any format at all, depends on what you want to do later on. If you need the date later on for reference in a where or similar, a format is not needed:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
a='30. heinäkuuta 2018 09:52:06';
b=strip(substr(a,1,(length(a)-8)));
c=input(b,nldate20.);
call symput('c',put(c,best.));
run;

%put c=&amp;amp;c.;

data have; /* build some example data */
format date yymmddd10.;
do date = today() - 10 to today() + 10;
  output;
end;
run;

data want; /* select from example */
set have;
where date le &amp;amp;c.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Aug 2018 12:04:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/need-to-convert-fiinnish-date-to-date9-format/m-p/483047#M31313</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-01T12:04:29Z</dc:date>
    </item>
  </channel>
</rss>

