<?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: Help : Day formatting Problem in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Help-Day-formatting-Problem/m-p/126622#M6665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS probably imported the value as a SAS datetime variable. Try displaying the value with a DATETIME20. variable. HINT: you can do this in Viewtable by clicking on the column heading and changing the format in the properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How critical is the leading 0 in the day? Do you need in display or to manipulate? To get a numeric value of the day of the month from a datetime variable:&lt;/P&gt;&lt;P&gt;DayOfMonth = day(datepart(starttime));&lt;/P&gt;&lt;P&gt;You could assign the a Z format so it displays with a leading zero: Format DayOfMonth z2.;&lt;/P&gt;&lt;P&gt;or create a character variable&lt;/P&gt;&lt;P&gt;DayOfMonth = put(day(datepart(starttime)),z2.);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jan 2013 16:08:18 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2013-01-16T16:08:18Z</dc:date>
    <item>
      <title>Help : Day formatting Problem</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-Day-formatting-Problem/m-p/126621#M6664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;Hi I have some questions about formatting.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;Anyone who can handle this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;please comment.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;1. From the excel data as follows I imported &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;it to SAS data set&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;&lt;IMG __jive_id="2960" alt="111.png" class="jive-image" src="https://communities.sas.com/legacyfs/online/2960_111.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;2. And naturally it was converted to SAS like &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;this (See Starttime variable)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;&lt;IMG __jive_id="2961" alt="2222.png" class="jive-image-thumbnail jive-image" height="92" src="https://communities.sas.com/legacyfs/online/2961_2222.png" width="998" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. &lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;What I want to do is to extract the ‘DAY’ &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;from the Starttime variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;(e.g. if the starttime record is 2012-07-05 18:41 then I want to make it represented&lt;STRONG style="font-size: 14pt;"&gt; like&amp;nbsp; '&lt;SPAN style="color: #ff0000;"&gt;05&lt;/SPAN&gt;'&amp;nbsp; just day!&lt;/STRONG&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;And to do that, I wrote code like this. But &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: times new roman,times; font-size: 12pt;"&gt;it doesn’t really work at all.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background: white; color: navy; line-height: 115%; font-family: 굴림체; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'MS Sans Serif'; mso-bidi-font-family: 굴림체; mso-font-kerning: 0pt;"&gt;data&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background: white; color: black; line-height: 115%; font-family: 굴림체; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'MS Sans Serif'; mso-bidi-font-family: 굴림체; mso-font-kerning: 0pt;"&gt; yhg0; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background: white; color: blue; line-height: 115%; font-family: 굴림체; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'MS Sans Serif'; mso-bidi-font-family: 굴림체; mso-font-kerning: 0pt;"&gt;set &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background: white; color: black; line-height: 115%; font-family: 굴림체; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'MS Sans Serif'; mso-bidi-font-family: 굴림체; mso-font-kerning: 0pt;"&gt;yhg; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background: white; color: blue; line-height: 115%; font-family: 굴림체; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'MS Sans Serif'; mso-bidi-font-family: 굴림체; mso-font-kerning: 0pt;"&gt;format&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background: white; color: black; line-height: 115%; font-family: 굴림체; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'MS Sans Serif'; mso-bidi-font-family: 굴림체; mso-font-kerning: 0pt;"&gt; starttime &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background: white; color: teal; line-height: 115%; font-family: 굴림체; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'MS Sans Serif'; mso-bidi-font-family: 굴림체; mso-font-kerning: 0pt;"&gt;day4.&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background: white; color: black; line-height: 115%; font-family: 굴림체; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'MS Sans Serif'; mso-bidi-font-family: 굴림체; mso-font-kerning: 0pt;"&gt;; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background: white; color: navy; line-height: 115%; font-family: 굴림체; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'MS Sans Serif'; mso-bidi-font-family: 굴림체; mso-font-kerning: 0pt;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background: white; color: black; line-height: 115%; font-family: 굴림체; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'MS Sans Serif'; mso-bidi-font-family: 굴림체; mso-font-kerning: 0pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background: white; color: black; line-height: 115%; font-family: times new roman,times; font-size: 12pt; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'MS Sans Serif'; mso-bidi-font-family: 굴림체; mso-font-kerning: 0pt;"&gt;if I use the code above. SAS shows me the result like this which I don't really expect.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background: white; color: black; line-height: 115%; font-family: 굴림체; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'MS Sans Serif'; mso-bidi-font-family: 굴림체; mso-font-kerning: 0pt;"&gt;&lt;IMG __jive_id="2962" alt="3333.png" class="jive-image-thumbnail jive-image" height="90" src="https://communities.sas.com/legacyfs/online/2962_3333.png" width="873" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;How can I make it right ? Please comment your generous help.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 07:46:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-Day-formatting-Problem/m-p/126621#M6664</guid>
      <dc:creator>Yondori</dc:creator>
      <dc:date>2013-01-16T07:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help : Day formatting Problem</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-Day-formatting-Problem/m-p/126622#M6665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS probably imported the value as a SAS datetime variable. Try displaying the value with a DATETIME20. variable. HINT: you can do this in Viewtable by clicking on the column heading and changing the format in the properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How critical is the leading 0 in the day? Do you need in display or to manipulate? To get a numeric value of the day of the month from a datetime variable:&lt;/P&gt;&lt;P&gt;DayOfMonth = day(datepart(starttime));&lt;/P&gt;&lt;P&gt;You could assign the a Z format so it displays with a leading zero: Format DayOfMonth z2.;&lt;/P&gt;&lt;P&gt;or create a character variable&lt;/P&gt;&lt;P&gt;DayOfMonth = put(day(datepart(starttime)),z2.);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 16:08:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-Day-formatting-Problem/m-p/126622#M6665</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-01-16T16:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help : Day formatting Problem</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-Day-formatting-Problem/m-p/126623#M6666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a bunch it works~!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2013 03:08:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-Day-formatting-Problem/m-p/126623#M6666</guid>
      <dc:creator>Yondori</dc:creator>
      <dc:date>2013-01-17T03:08:07Z</dc:date>
    </item>
  </channel>
</rss>

