<?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: date format issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615300#M179971</link>
    <description>Hi Team&lt;BR /&gt;could anyone please explain above issue it's very helpfull&lt;BR /&gt;Thanks &amp;amp; Regards&lt;BR /&gt;Rohit</description>
    <pubDate>Mon, 06 Jan 2020 12:26:12 GMT</pubDate>
    <dc:creator>rohitkrishna</dc:creator>
    <dc:date>2020-01-06T12:26:12Z</dc:date>
    <item>
      <title>date format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615278#M179962</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am facing one challenge in one of the sas code, please find the below code and the main issue is while printing the current business date, the date part has shown &lt;FONT color="#FF6600"&gt;00&lt;/FONT&gt; instead of today's date kindly check and give some suggestions for that&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;input data:&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;H202001060000010&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the sas code&amp;nbsp;&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Busdate = &amp;amp;Busdatc ;&lt;BR /&gt;&lt;BR /&gt;FILE LSFOHEAD; /* Header Record */&lt;BR /&gt;&lt;BR /&gt;PUT @ 1 'H'&lt;BR /&gt;@ 2 BUSDATE&lt;BR /&gt;@ 9 Count Z8.;&lt;BR /&gt;End;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the output has&amp;nbsp;&lt;/P&gt;&lt;P&gt;and moreover, for the global macro, it prints properly in spool&amp;nbsp;&lt;/P&gt;&lt;P&gt;SYMBOLGEN: Macro variable BUSDATC resolves to 20200106&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;H202001&lt;FONT color="#FF6600"&gt;00&lt;/FONT&gt;0000010&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;above highlighted one has a faulty date&amp;nbsp; instead of 06 it shows 00&amp;nbsp; kind;ly suggest some solutions for that&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rohit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 10:52:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615278#M179962</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2020-01-06T10:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: date format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615283#M179964</link>
      <description>&lt;P&gt;Try&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PUT @ 1 'H'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;@ 2 BUSDATE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;@ &lt;STRONG&gt;10&lt;/STRONG&gt; Count Z8.;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 11:18:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615283#M179964</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-01-06T11:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: date format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615285#M179966</link>
      <description>Hi Ksharp,&lt;BR /&gt;Thanks for the quick response&lt;BR /&gt;it's working fine but may I know what is the exact thing has happening above code please kindly explain in details&lt;BR /&gt;Thanks &amp;amp; regards&lt;BR /&gt;rohit&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Jan 2020 11:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615285#M179966</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2020-01-06T11:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: date format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615292#M179970</link>
      <description>Hi Ksharp,&lt;BR /&gt;why i asked the detail bez the previous sas code we didn't mention any year cutoff option=1950 that time it works fine with PUT @ 1 'H'&lt;BR /&gt;@ 2 BUSDATE&lt;BR /&gt;@ 9 Count Z8.;&lt;BR /&gt;above lengths no why it suddenly got 00 instead of date kindly explain it, please&lt;BR /&gt;thanks &amp;amp; regards&lt;BR /&gt;rohit&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Jan 2020 12:00:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615292#M179970</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2020-01-06T12:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: date format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615300#M179971</link>
      <description>Hi Team&lt;BR /&gt;could anyone please explain above issue it's very helpfull&lt;BR /&gt;Thanks &amp;amp; Regards&lt;BR /&gt;Rohit</description>
      <pubDate>Mon, 06 Jan 2020 12:26:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615300#M179971</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2020-01-06T12:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: date format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615306#M179974</link>
      <description>&lt;P&gt;How is the variable BUSDATE defined?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it a character string?&amp;nbsp; If so are all of the values exactly the same length?&lt;/P&gt;
&lt;P&gt;Is it a numeric variable?&amp;nbsp; Does it contain date values? If so what format is attached to the variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Or does it just contain numbers like 20,200,106 that might look to humans like a date if printed without the commas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Your problem is with the @ pointer controls.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You wanted this layout:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;----+----0----+-
H202001060000010
^^       ^
||       |
||       +-&amp;gt; 7 digit number with leading zeros
|=-&amp;gt; 8 digit date string in YYYYMMDD 
+-&amp;gt; 1 Character code&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;By starting the last field in column 9 instead of 10 you have overwritten the last character of the date representation.&amp;nbsp; You also wrote 8 digits for the COUNT field instead of the 7 that your pattern shows.&amp;nbsp; Which length is correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 12:48:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615306#M179974</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-01-06T12:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: date format issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615320#M179977</link>
      <description>&lt;P&gt;When you have a length of X and start to put at position Y, the next item must start at position Y + X. In your case, position 2 + length 8 results in next position 10.&lt;/P&gt;
&lt;P&gt;If in doubt, use your fingers (I often do that, too, when I seem to be stuck!), or draw a ruler and count off the positions.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 13:01:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-format-issue/m-p/615320#M179977</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-01-06T13:01:11Z</dc:date>
    </item>
  </channel>
</rss>

