<?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: what does the D mean? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724669#M224994</link>
    <description>&lt;P&gt;The D indicates that SAS will convert the value inside the double-quotes to a valid SAS date. SAS dates are integers, representing the number of days since 01JAN1960, so the correct value is 0 (if there are no syntax errors). Had the code read&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;x="01JAN2020"d;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the value would be 21915, the number of days since 01JAN1960.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Mar 2021 22:08:14 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-03-08T22:08:14Z</dc:date>
    <item>
      <title>what does the D mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724666#M224993</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tianerhu_0-1615240155141.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55682i7E9E3A21323DFFB2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tianerhu_0-1615240155141.png" alt="tianerhu_0-1615240155141.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;What does the upperletter D mean&amp;nbsp; ? and why is the code wrong? Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 21:50:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724666#M224993</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-03-08T21:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: what does the D mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724669#M224994</link>
      <description>&lt;P&gt;The D indicates that SAS will convert the value inside the double-quotes to a valid SAS date. SAS dates are integers, representing the number of days since 01JAN1960, so the correct value is 0 (if there are no syntax errors). Had the code read&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;x="01JAN2020"d;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the value would be 21915, the number of days since 01JAN1960.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 22:08:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724669#M224994</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-03-08T22:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: what does the D mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724671#M224995</link>
      <description>&lt;P&gt;It's a "constant" (could have sworn it was once called literal) and tells SAS to interpret the data in quotes as a date.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some of the other options you may see:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DT -&amp;gt; Datetime&lt;/P&gt;
&lt;P&gt;T -&amp;gt; Time&lt;/P&gt;
&lt;P&gt;N -&amp;gt; Variable or data set name&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This also means if you add code right after the end of the quotation marks you can sometimes get a message about the behaviour of a variable after a quote changing over time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE id="n0a9k4uppx43fyn19z5ees1ee5uy" class="xisDoc-table"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-horizontalLeft xisDoc-verticalBottom" width="360px"&gt;
&lt;P class="xisDoc-paragraph"&gt;Characters That Follow a Character Constant&lt;/P&gt;
&lt;/TH&gt;
&lt;TH class="xisDoc-horizontalLeft xisDoc-verticalBottom" width="211.111px"&gt;
&lt;P class="xisDoc-paragraph"&gt;&amp;nbsp; &amp;nbsp;Possible Interpretations&lt;/P&gt;
&lt;/TH&gt;
&lt;TH class="xisDoc-horizontalLeft xisDoc-verticalBottom" width="186.667px"&gt;
&lt;P class="xisDoc-paragraph"&gt;&amp;nbsp; &amp;nbsp; Examples&lt;/P&gt;
&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="360px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;b&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="211.111px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;bit testing constant&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="186.667px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;'00100000'b&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="360px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;d&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="211.111px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;date constant&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="186.667px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;'01jan04'd&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="360px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;dt&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="211.111px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;datetime constant&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="186.667px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;'18jan2005:9:27:05am'dt&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="360px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;n&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="211.111px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;name literal&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="186.667px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;'My Table'n&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="360px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;t&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="211.111px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;time constant&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="186.667px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;'9:25:19pm't&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="360px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;x&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="211.111px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;hexadecimal notation&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="186.667px" class="xisDoc-horizontalLeft xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;'534153'x&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lrcon&amp;amp;docsetTarget=p0cq7f0icfjr8vn19vyunwmmsl7m.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lrcon&amp;amp;docsetTarget=p0cq7f0icfjr8vn19vyunwmmsl7m.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/268447"&gt;@tianerhu&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tianerhu_0-1615240155141.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55682i7E9E3A21323DFFB2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tianerhu_0-1615240155141.png" alt="tianerhu_0-1615240155141.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;What does the upperletter D mean&amp;nbsp; ? and why is the code wrong? Thank you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 22:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724671#M224995</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-03-08T22:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: what does the D mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724675#M224997</link>
      <description>&lt;P&gt;With pictures it is hard to tell but it appears to me that there is a space between the " and the D&lt;/P&gt;
&lt;P&gt;Examine the lines below:&lt;/P&gt;
&lt;PRE&gt;"01JAN1960" D
"01JAN1960"D

&lt;/PRE&gt;
&lt;P&gt;The first would be an error, the second is a date literal. Date literal is the way that you tell SAS you want to use the internal numeric representation of a date (or datetime or time value). The D could be lower case as could the month abbreviation. But there cannot be a space between the quote and the letter.&lt;/P&gt;
&lt;P&gt;Example log from running code involving those two lines:&lt;/P&gt;
&lt;PRE&gt;58   data junk;
59      x="01JAN1960" D;
                      -
                      22
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;,
              =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |,
              ||, ~=.

60   run;

NOTE: Character values have been converted to numeric values at the places given by:
      (Line):(Column).
      59:6
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.JUNK may be incomplete.  When this step was stopped there were 0
         observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds


61
62   data junk2;
63      x="01JAN1960"D;
64   run;

NOTE: The data set WORK.JUNK2 has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;The underscore under the letter D in the first bit is "unexpected" because of the space.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pictures of proportional font text can be hard to tell but I think that is the issue in this case.&lt;/P&gt;
&lt;P&gt;If you copy and run my code you will find the value of X in the Junk2 data set is indeed 0. 1 January 1960 is the base numeric value for dates and is day "zero".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 22:04:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724675#M224997</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-08T22:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: what does the D mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724722#M225020</link>
      <description>Thank you.</description>
      <pubDate>Tue, 09 Mar 2021 00:40:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724722#M225020</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-03-09T00:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: what does the D mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724740#M225027</link>
      <description>Thank you .</description>
      <pubDate>Tue, 09 Mar 2021 01:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724740#M225027</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-03-09T01:46:00Z</dc:date>
    </item>
    <item>
      <title>what does the @ (in the input statement) mean ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724744#M225028</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tianerhu_1-1615256796945.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55694i00DED05691D0BB90/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tianerhu_1-1615256796945.png" alt="tianerhu_1-1615256796945.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tianerhu_2-1615256814888.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55695i8D64785665FB0E85/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tianerhu_2-1615256814888.png" alt="tianerhu_2-1615256814888.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 02:27:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-does-the-D-mean/m-p/724744#M225028</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-03-09T02:27:57Z</dc:date>
    </item>
  </channel>
</rss>

