<?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 NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return a in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/NOTE-Invalid-or-missing-arguments-to-the-DATEPART-function-have/m-p/419845#M27008</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I doing multiple left join in order to create a new table but I getting the following note:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return a missing value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: SAS threaded sort was used.&lt;BR /&gt;NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return a missing value.&lt;BR /&gt;NOTE: Invalid (or missing) arguments to the TIMEPART function have caused the function to return a missing value.&lt;BR /&gt;NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return a missing value.&lt;BR /&gt;NOTE: Invalid (or missing) arguments to the TIMEPART function have caused the function to return a missing value.&lt;BR /&gt;NOTE: Table WORK.PROVNBQT1 created, with 1205036 rows and 45 columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Despite a note is not an error message is there a way to avoid this note.&amp;nbsp; The only information that I found on the web is that I might have missing value or wrong format data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have checked for missing value and I did not find any.&amp;nbsp; How can I check the date format of&amp;nbsp;&lt;SPAN&gt;table1.dttrnsys&lt;/SPAN&gt; because they look all the same?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What are the consequences of those missing values on the join?&lt;/P&gt;&lt;P&gt;Thanks in advance for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table provnbqt1&lt;BR /&gt;as select table1.*, table5.dtcreationVIP, table5.hrcreationVIP, table5.VIP,&lt;BR /&gt;table6.clicassure, datepart(table6.started) as dtcreationCLA format yymmdd10., timepart(table6.started) as hrcreationCLA format time8.,&lt;BR /&gt;table7.rentecoll, datepart(table7.started) as dtcreationRCO format yymmdd10., timepart(table7.started) as hrcreationRCO format time8.,&lt;BR /&gt;table8.web&lt;/P&gt;&lt;P&gt;FROM provnbqt as table1&lt;/P&gt;&lt;P&gt;left join ref_vip as table5&lt;BR /&gt;on table1.ACCOUNTNUMBER = table5.ACCOUNT_NUMBER and table1.dttrnsys = table5.dtcreationVIP&lt;/P&gt;&lt;P&gt;left join clicassure as table6&lt;/P&gt;&lt;P&gt;left join rente_coll as table7&lt;BR /&gt;on table1.ACCOUNTNUMBER = table7.primaryentityid and datepart(table7.started)&amp;lt;=table1.dttrnsys&amp;lt;=sum(datepart(table7.started),7) and table1.type_lot="QT"&lt;/P&gt;&lt;P&gt;left join SoumEnLigne (where=( PRIMARYENTITYCLASS eq "Quote")) as table8&lt;BR /&gt;on table1.POLICYNUMBER = table8.primaryentityid and&lt;BR /&gt;datepart(table8.started)&amp;lt;=table1.dttrnsys&amp;lt;=sum(datepart(table8.started),7)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;left join SoumEnLigne (where =(PRIMARYENTITYCLASS eq "Account")) as table9&lt;BR /&gt;on table1.ACCOUNTNUMBER = table9.primaryentityid and&lt;BR /&gt;datepart(table9.started)&amp;lt;=table1.dttrnsys&amp;lt;=sum(datepart(table9.started),7) and table1.type_lot="QT"&lt;/P&gt;&lt;P&gt;;&lt;BR /&gt;QUIT;&lt;/P&gt;</description>
    <pubDate>Sat, 09 Dec 2017 20:02:37 GMT</pubDate>
    <dc:creator>alepage</dc:creator>
    <dc:date>2017-12-09T20:02:37Z</dc:date>
    <item>
      <title>NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return a</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/NOTE-Invalid-or-missing-arguments-to-the-DATEPART-function-have/m-p/419845#M27008</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I doing multiple left join in order to create a new table but I getting the following note:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return a missing value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: SAS threaded sort was used.&lt;BR /&gt;NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return a missing value.&lt;BR /&gt;NOTE: Invalid (or missing) arguments to the TIMEPART function have caused the function to return a missing value.&lt;BR /&gt;NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return a missing value.&lt;BR /&gt;NOTE: Invalid (or missing) arguments to the TIMEPART function have caused the function to return a missing value.&lt;BR /&gt;NOTE: Table WORK.PROVNBQT1 created, with 1205036 rows and 45 columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Despite a note is not an error message is there a way to avoid this note.&amp;nbsp; The only information that I found on the web is that I might have missing value or wrong format data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have checked for missing value and I did not find any.&amp;nbsp; How can I check the date format of&amp;nbsp;&lt;SPAN&gt;table1.dttrnsys&lt;/SPAN&gt; because they look all the same?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What are the consequences of those missing values on the join?&lt;/P&gt;&lt;P&gt;Thanks in advance for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table provnbqt1&lt;BR /&gt;as select table1.*, table5.dtcreationVIP, table5.hrcreationVIP, table5.VIP,&lt;BR /&gt;table6.clicassure, datepart(table6.started) as dtcreationCLA format yymmdd10., timepart(table6.started) as hrcreationCLA format time8.,&lt;BR /&gt;table7.rentecoll, datepart(table7.started) as dtcreationRCO format yymmdd10., timepart(table7.started) as hrcreationRCO format time8.,&lt;BR /&gt;table8.web&lt;/P&gt;&lt;P&gt;FROM provnbqt as table1&lt;/P&gt;&lt;P&gt;left join ref_vip as table5&lt;BR /&gt;on table1.ACCOUNTNUMBER = table5.ACCOUNT_NUMBER and table1.dttrnsys = table5.dtcreationVIP&lt;/P&gt;&lt;P&gt;left join clicassure as table6&lt;/P&gt;&lt;P&gt;left join rente_coll as table7&lt;BR /&gt;on table1.ACCOUNTNUMBER = table7.primaryentityid and datepart(table7.started)&amp;lt;=table1.dttrnsys&amp;lt;=sum(datepart(table7.started),7) and table1.type_lot="QT"&lt;/P&gt;&lt;P&gt;left join SoumEnLigne (where=( PRIMARYENTITYCLASS eq "Quote")) as table8&lt;BR /&gt;on table1.POLICYNUMBER = table8.primaryentityid and&lt;BR /&gt;datepart(table8.started)&amp;lt;=table1.dttrnsys&amp;lt;=sum(datepart(table8.started),7)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;left join SoumEnLigne (where =(PRIMARYENTITYCLASS eq "Account")) as table9&lt;BR /&gt;on table1.ACCOUNTNUMBER = table9.primaryentityid and&lt;BR /&gt;datepart(table9.started)&amp;lt;=table1.dttrnsys&amp;lt;=sum(datepart(table9.started),7) and table1.type_lot="QT"&lt;/P&gt;&lt;P&gt;;&lt;BR /&gt;QUIT;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Dec 2017 20:02:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/NOTE-Invalid-or-missing-arguments-to-the-DATEPART-function-have/m-p/419845#M27008</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2017-12-09T20:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/NOTE-Invalid-or-missing-arguments-to-the-DATEPART-function-have/m-p/419849#M27009</link>
      <description>&lt;P&gt;Check it in a datastep. The errors from the data step indicate which rows are the problematic ones and you can find the issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at the ?? Option for INPUT() so you can suppress these notes if needed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have a lot of tables to check though. If you post the full log it may be more informative.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Dec 2017 20:25:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/NOTE-Invalid-or-missing-arguments-to-the-DATEPART-function-have/m-p/419849#M27009</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-09T20:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/NOTE-Invalid-or-missing-arguments-to-the-DATEPART-function-have/m-p/419851#M27010</link>
      <description>&lt;P&gt;Since you are doing a series of LEFT JOINs any observation where TABLE6 or TABLE7 do not contribute will have missing values for these variables in your selection list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;, datepart(table6.started) as dtcreationCLA format yymmdd10.
, timepart(table6.started) as hrcreationCLA format time8.
...
, datepart(table7.started) as dtcreationRCO format yymmdd10.
, timepart(table7.started) as hrcreationRCO format time8.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You could try adding a CASE statement and see if that removes the notes.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;, case when missing(table6.started) then . 
  else datepart(table6.started) 
  end as dtcreationCLA format yymmdd10.
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also you do not have an ON clause for the join to TABLE6.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Dec 2017 20:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/NOTE-Invalid-or-missing-arguments-to-the-DATEPART-function-have/m-p/419851#M27010</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-12-09T20:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/NOTE-Invalid-or-missing-arguments-to-the-DATEPART-function-have/m-p/419859#M27011</link>
      <description>&lt;P&gt;I did a mistake when I have paste my code...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the complete code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I might have erase few lines accidentaly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the complete code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table provnbqt1&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;as select table1.*, table5.dtcreationVIP, table5.hrcreationVIP, table5.VIP,&lt;BR /&gt;table6.clicassure, datepart(table6.started) as dtcreationCLA format yymmdd10., timepart(table6.started) as hrcreationCLA format time8.,&lt;BR /&gt;table7.rentecoll, datepart(table7.started) as dtcreationRCO format yymmdd10., timepart(table7.started) as hrcreationRCO format time8.,&lt;BR /&gt;table8.web&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FROM provnbqt as table1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;left join ref_vip as table5&lt;BR /&gt;on table1.ACCOUNTNUMBER = table5.ACCOUNT_NUMBER and table1.dttrnsys = table5.dtcreationVIP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;left join clicassure as table6&lt;BR /&gt;on table1.ACCOUNTNUMBER = table6.primaryentityid and datepart(table6.started)&amp;lt;=table1.dttrnsys&amp;lt;=sum(datepart(table6.started),7) and table1.type_lot=&lt;SPAN&gt;"QT"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;left join rente_coll as table7&lt;BR /&gt;on table1.ACCOUNTNUMBER = table7.primaryentityid and datepart(table7.started)&amp;lt;=table1.dttrnsys&amp;lt;=sum(datepart(table7.started),7) and table1.type_lot="QT"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;left join SoumEnLigne (where=( PRIMARYENTITYCLASS eq "Quote")) as table8&lt;BR /&gt;on table1.POLICYNUMBER = table8.primaryentityid and&lt;BR /&gt;datepart(table8.started)&amp;lt;=table1.dttrnsys&amp;lt;=sum(datepart(table8.started),7)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;left join SoumEnLigne (where =(PRIMARYENTITYCLASS eq "Account")) as table9&lt;BR /&gt;on table1.ACCOUNTNUMBER = table9.primaryentityid and&lt;BR /&gt;datepart(table9.started)&amp;lt;=table1.dttrnsys&amp;lt;=sum(datepart(table9.started),7) and table1.type_lot="QT"&lt;/P&gt;&lt;P&gt;;&lt;BR /&gt;QUIT;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Dec 2017 21:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/NOTE-Invalid-or-missing-arguments-to-the-DATEPART-function-have/m-p/419859#M27011</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2017-12-09T21:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/NOTE-Invalid-or-missing-arguments-to-the-DATEPART-function-have/m-p/419860#M27012</link>
      <description>&lt;P&gt;I will try this solution on Monday. I let you know if it works.&lt;/P&gt;&lt;P&gt;I wish you a nice weekend.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Dec 2017 21:27:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/NOTE-Invalid-or-missing-arguments-to-the-DATEPART-function-have/m-p/419860#M27012</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2017-12-09T21:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: Invalid (or missing) arguments to the DATEPART function have caused the function to return</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/NOTE-Invalid-or-missing-arguments-to-the-DATEPART-function-have/m-p/420194#M27023</link>
      <description>Thanks for your help! It works...</description>
      <pubDate>Mon, 11 Dec 2017 17:07:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/NOTE-Invalid-or-missing-arguments-to-the-DATEPART-function-have/m-p/420194#M27023</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2017-12-11T17:07:14Z</dc:date>
    </item>
  </channel>
</rss>

