<?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 Trouble with proc fcmp in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Trouble-with-proc-fcmp/m-p/791073#M253323</link>
    <description>&lt;P&gt;Playing around trying to learn FCMP.&amp;nbsp; Below is an example I can't figure out.&amp;nbsp; The hardcoded code and the function code are the same but the hardcoded actually works and function code will simple go the 0 date value?&amp;nbsp; I think it has sth to do the the input to arguement 1 but&amp;nbsp; its declared as text like it should be??&amp;nbsp; Appreciate your time and have a good one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc fcmp outlib= sasuser.funcs.clinical_project;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;function make8601v1( in1 $ , in2 ) $;&lt;BR /&gt;temp = cat( put( in1 , IS8601DA.), "T" , put( in2 , TOD8. ) ) ;&lt;/P&gt;&lt;P&gt;return( temp);&lt;BR /&gt;endsub;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data f1;&lt;BR /&gt;A='11/22/2018';&lt;BR /&gt;B='10:14:00't;&lt;BR /&gt;correct = cat( put( A , IS8601DA.), "T" , put( B , TOD8. ) ) ;&lt;BR /&gt;from_func = make8601v1(A,B);&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jan 2022 04:53:01 GMT</pubDate>
    <dc:creator>thryce85</dc:creator>
    <dc:date>2022-01-20T04:53:01Z</dc:date>
    <item>
      <title>Trouble with proc fcmp</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-with-proc-fcmp/m-p/791073#M253323</link>
      <description>&lt;P&gt;Playing around trying to learn FCMP.&amp;nbsp; Below is an example I can't figure out.&amp;nbsp; The hardcoded code and the function code are the same but the hardcoded actually works and function code will simple go the 0 date value?&amp;nbsp; I think it has sth to do the the input to arguement 1 but&amp;nbsp; its declared as text like it should be??&amp;nbsp; Appreciate your time and have a good one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc fcmp outlib= sasuser.funcs.clinical_project;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;function make8601v1( in1 $ , in2 ) $;&lt;BR /&gt;temp = cat( put( in1 , IS8601DA.), "T" , put( in2 , TOD8. ) ) ;&lt;/P&gt;&lt;P&gt;return( temp);&lt;BR /&gt;endsub;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data f1;&lt;BR /&gt;A='11/22/2018';&lt;BR /&gt;B='10:14:00't;&lt;BR /&gt;correct = cat( put( A , IS8601DA.), "T" , put( B , TOD8. ) ) ;&lt;BR /&gt;from_func = make8601v1(A,B);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 04:53:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-with-proc-fcmp/m-p/791073#M253323</guid>
      <dc:creator>thryce85</dc:creator>
      <dc:date>2022-01-20T04:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with proc fcmp</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-with-proc-fcmp/m-p/791076#M253326</link>
      <description>&lt;P&gt;I question your claim that the "hard code" works. When I run your code without the FCMP procedure involved:&lt;/P&gt;
&lt;PRE&gt;1    data f1;
2    A='11/22/2018';
3    B='10:14:00't;
4    correct = cat( put( A , IS8601DA.), "T" , put( B , TOD8. ) ) ;
                             ---------
                             484
NOTE 484-185: Format $IS8601DA was not found or could not be loaded.

5    run;

&lt;/PRE&gt;
&lt;P&gt;For A to be a date value that could use the IS8601DA format A would have to be: A="22Nov2018"D; The above generates an error because A is a character variable&lt;/P&gt;
&lt;P&gt;If you want to combine a DATE value with a TIME value I would suggest using the DHMS function:&lt;/P&gt;
&lt;P&gt;(assumes A is an actual date)&lt;/P&gt;
&lt;P&gt;Correct = dhms(a,0,0,b);&lt;/P&gt;
&lt;P&gt;And then assign an appropriate Format like E8601DT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or if you really need a character value then: Correct = put(dhms(a,0,0,b),E8601dt19.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 05:27:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-with-proc-fcmp/m-p/791076#M253326</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-01-20T05:27:09Z</dc:date>
    </item>
  </channel>
</rss>

