<?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 Function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279664#M56383</link>
    <description>&lt;P&gt;It is interesting problem. If you can share the result of proc contents data=test.dummy; run; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;I am interested to know details of the column type.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jun 2016 06:28:04 GMT</pubDate>
    <dc:creator>RahulG</dc:creator>
    <dc:date>2016-06-23T06:28:04Z</dc:date>
    <item>
      <title>SAS Date Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279661#M56381</link>
      <description>&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need your expertise. facing an problem while using Date condition in where clase. i want the data from 1st of May&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE WORK.QUERY_FOR_dummy AS&lt;BR /&gt;SELECT t1.billingdate&lt;BR /&gt;FROM test.dummy t1&lt;BR /&gt;WHERE t1.billingdate &amp;gt;= '01May2016'd;&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output was from 5th of Jan.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the value is stored as date in the billingdate field. if i run a sql query in query builder the output is from 1st of may. only when i use SAS EG am facing this problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please note - if i give&amp;nbsp;&lt;STRONG&gt;WHERE t1.billingdate &amp;gt;= '05JAN2016'd;&amp;nbsp;&lt;/STRONG&gt;in this way am getting results from 1st of May.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;can you guys please suggest what is the correct format to use.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 06:17:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279661#M56381</guid>
      <dc:creator>yog_pals</dc:creator>
      <dc:date>2016-06-23T06:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279664#M56383</link>
      <description>&lt;P&gt;It is interesting problem. If you can share the result of proc contents data=test.dummy; run; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;I am interested to know details of the column type.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 06:28:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279664#M56383</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2016-06-23T06:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279668#M56385</link>
      <description>&lt;P&gt;Please post the log, including the sql step code.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 06:55:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279668#M56385</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-23T06:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279672#M56387</link>
      <description>1 The SAS System 09:59 Thursday, June 23, 2016&lt;BR /&gt;&lt;BR /&gt;1 ;*';*";*/;quit;run;&lt;BR /&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='Query Builder';&lt;BR /&gt;4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';&lt;BR /&gt;5 %LET _CLIENTPROJECTPATH='';&lt;BR /&gt;6 %LET _CLIENTPROJECTNAME='';&lt;BR /&gt;7&lt;BR /&gt;8 ODS _ALL_ CLOSE;&lt;BR /&gt;9 OPTIONS DEV=ACTIVEX;&lt;BR /&gt;10 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;11 FILENAME EGSR TEMP;&lt;BR /&gt;12 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;BR /&gt;13 STYLE=HtmlBlue&lt;BR /&gt;14 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")&lt;BR /&gt;15 NOGTITLE&lt;BR /&gt;16 NOGFOOTNOTE&lt;BR /&gt;17 GPATH=&amp;amp;sasworklocation&lt;BR /&gt;18 ENCODING=UTF8&lt;BR /&gt;19 options(rolap="on")&lt;BR /&gt;20 ;&lt;BR /&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;21&lt;BR /&gt;22 GOPTIONS ACCESSIBLE;&lt;BR /&gt;23 %_eg_conditional_dropds(WORK.QUERY_FOR_dummy);&lt;BR /&gt;24&lt;BR /&gt;25 PROC SQL;&lt;BR /&gt;26 CREATE TABLE WORK.QUERY_FOR_dummy AS&lt;BR /&gt;27 SELECT t1.billingdate&lt;BR /&gt;28 FROM test.dummy t1&lt;BR /&gt;29 WHERE t1.billingdate &amp;gt;= '1May2016'd;&lt;BR /&gt;NOTE: Table WORK.QUERY_FOR_dummy created, with 8932083 rows and 1 columns.&lt;BR /&gt;&lt;BR /&gt;30 QUIT;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 52.48 seconds&lt;BR /&gt;cpu time 12.73 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;31&lt;BR /&gt;32 GOPTIONS NOACCESSIBLE;&lt;BR /&gt;33&lt;BR /&gt;34&lt;BR /&gt;35 %LET _CLIENTTASKLABEL=;&lt;BR /&gt;36 %LET _CLIENTPROCESSFLOWNAME=;&lt;BR /&gt;37 %LET _CLIENTPROJECTPATH=;&lt;BR /&gt;38 %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;39&lt;BR /&gt;40 ;*';*";*/;quit;run;&lt;BR /&gt;41 ODS _ALL_ CLOSE;&lt;BR /&gt;42&lt;BR /&gt;43&lt;BR /&gt;44 QUIT; RUN;&lt;BR /&gt;45&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Jun 2016 07:06:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279672#M56387</guid>
      <dc:creator>yog_pals</dc:creator>
      <dc:date>2016-06-23T07:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279674#M56388</link>
      <description>&lt;P&gt;if you can share billing date column data type and its format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then it would help to answer.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 07:09:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279674#M56388</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2016-06-23T07:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279675#M56389</link>
      <description>&lt;P&gt;What do you get when you run&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data query_for_dummy1;
set test.dummy (keep=billingdate);
where billingdate &amp;gt;= '01May2016'd;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(if you get dates before May 2016, once again post the log)&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 07:09:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279675#M56389</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-23T07:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279678#M56390</link>
      <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Alphabetic List of Variables and Attributes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;#&lt;/TD&gt;&lt;TD&gt;Variable&lt;/TD&gt;&lt;TD&gt;Type&lt;/TD&gt;&lt;TD&gt;Len&lt;/TD&gt;&lt;TD&gt;Format&lt;/TD&gt;&lt;TD&gt;Informat&lt;/TD&gt;&lt;TD&gt;Label&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;archflag&lt;/TD&gt;&lt;TD&gt;Num&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;archflag&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;batchserno&lt;/TD&gt;&lt;TD&gt;Num&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;batchserno&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;billingdate&lt;/TD&gt;&lt;TD&gt;Num&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;DATE9.&lt;/TD&gt;&lt;TD&gt;DATE9.&lt;/TD&gt;&lt;TD&gt;billingdate&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 23 Jun 2016 07:11:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279678#M56390</guid>
      <dc:creator>yog_pals</dc:creator>
      <dc:date>2016-06-23T07:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279679#M56391</link>
      <description>Still the same result. output coming from 5th Jan 2016. do we have to change the SAS date format or system date format. now it is setup as US Date (system Date)</description>
      <pubDate>Thu, 23 Jun 2016 07:16:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279679#M56391</guid>
      <dc:creator>yog_pals</dc:creator>
      <dc:date>2016-06-23T07:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279681#M56392</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/69691"&gt;@yog_pals&lt;/a&gt; wrote:&lt;BR /&gt;Still the same result. output coming from 5th Jan 2016. do we have to change the SAS date format or system date format. now it is setup as US Date (system Date)&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No, you don't have to change the settings. SAS date constants and date values are not affected by the system's settings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;next piece of test code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data query_for_dummy;
set test.dummy (keep=billingdate);
where billingdate = '01May2016'd;
run;

proc sort data=query_for_dummy;
by billingdate;
run;

data _null_;
set query_for_dummy (obs=1);
put billingdate=;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and post the log of this&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 07:23:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Date-Function/m-p/279681#M56392</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-23T07:23:22Z</dc:date>
    </item>
  </channel>
</rss>

