<?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: sas date format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-date-format/m-p/515041#M138956</link>
    <description>&lt;P&gt;Could you try below code, if you consider you have a dataset as have and you want to generate dataset want&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
Julianday(SUBSTR(Premium_To_Date,1,4) || '-' || SUBSTR(Premium_To_Date,5,2) || '-01') - Julianday(SUBSTR(Premium_From_Date,1,4) || '-' || SUBSTR(Premium_From_Date,5,2) || '-01') &amp;gt; 180;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 21 Nov 2018 10:24:27 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2018-11-21T10:24:27Z</dc:date>
    <item>
      <title>sas date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-date-format/m-p/515038#M138955</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;&amp;nbsp;below table is my portion of data set, What i want to do is to translate these sql codes to sas but it is quite diffcult to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can anyone help me with this. thanks a lot!!! My Data is char form&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Julianday(SUBSTR(PTF.Premium_To_Date,1,4) || '-' || SUBSTR(PTF.Premium_To_Date,5,2) || '-01') - Julianday(SUBSTR(PTF.Premium_From_Date,1,4) || '-' || SUBSTR(PTF.Premium_From_Date,5,2) || '-01') &amp;gt; 180&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;Premium&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Premium&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FromDate&amp;nbsp; &amp;nbsp;ToDate&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;20130101&lt;/TD&gt;&lt;TD&gt;20130131&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20130101&lt;/TD&gt;&lt;TD&gt;20130131&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20130101&lt;/TD&gt;&lt;TD&gt;20130131&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20130101&lt;/TD&gt;&lt;TD&gt;20130131&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20130101&lt;/TD&gt;&lt;TD&gt;20130131&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20130101&lt;/TD&gt;&lt;TD&gt;20130131&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20130101&lt;/TD&gt;&lt;TD&gt;20130131&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20130101&lt;/TD&gt;&lt;TD&gt;20130131&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20130101&lt;/TD&gt;&lt;TD&gt;20130131&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 21 Nov 2018 10:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-date-format/m-p/515038#M138955</guid>
      <dc:creator>harrylui</dc:creator>
      <dc:date>2018-11-21T10:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: sas date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-date-format/m-p/515041#M138956</link>
      <description>&lt;P&gt;Could you try below code, if you consider you have a dataset as have and you want to generate dataset want&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
Julianday(SUBSTR(Premium_To_Date,1,4) || '-' || SUBSTR(Premium_To_Date,5,2) || '-01') - Julianday(SUBSTR(Premium_From_Date,1,4) || '-' || SUBSTR(Premium_From_Date,5,2) || '-01') &amp;gt; 180;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Nov 2018 10:24:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-date-format/m-p/515041#M138956</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2018-11-21T10:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: sas date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-date-format/m-p/515046#M138957</link>
      <description>&lt;P&gt;i am using studio version and there is no JULIANDAY Function, thx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 10:58:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-date-format/m-p/515046#M138957</guid>
      <dc:creator>harrylui</dc:creator>
      <dc:date>2018-11-21T10:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: sas date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-date-format/m-p/515062#M138958</link>
      <description>&lt;P&gt;Please post data in a usable form and show what you expect as result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steps to solve the problem&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;use input-function with the appropriate informat to convert the char-dates to sas-dates&lt;/LI&gt;
&lt;LI&gt;use intck to calculate the difference&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 21 Nov 2018 12:26:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-date-format/m-p/515062#M138958</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-11-21T12:26:38Z</dc:date>
    </item>
  </channel>
</rss>

