<?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 desire date and time not reflecting in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/desire-date-and-time-not-reflecting/m-p/859129#M339459</link>
    <description>&lt;P&gt;&lt;STRONG&gt;date(DOD) time (adt) is in numeric format only but&amp;nbsp; in output exstdtc and&amp;nbsp;exendtc showing like below image&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shyamtawde_1-1676535047674.png" style="width: 572px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80457i29CA394A5EE19A47/image-dimensions/572x322?v=v2" width="572" height="322" role="button" title="shyamtawde_1-1676535047674.png" alt="shyamtawde_1-1676535047674.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;below is the code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if dod ne . then doastdtn=input(strip(compress(dod,"-")),??date7.);&lt;BR /&gt;if doastdtn ne . then doastdt=strip(put(doastdtn,??date9.));&lt;BR /&gt;if adt ne . then doasttm=strip(adt);&lt;BR /&gt;if adt ne . then doasttmn=input(adt,??time5.);&lt;BR /&gt;if length(strip(doasttm)) le 7 and index(doasttm,":") eq 2 then doasttm="0"||strip(doasttm);&lt;/P&gt;&lt;P&gt;%dateder(indate=doastdt, intime=doasttm, outdt=exstdtc);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Log:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shyamtawde_2-1676535151592.png" style="width: 753px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80458i262AE71A934A7463/image-dimensions/753x424?v=v2" width="753" height="424" role="button" title="shyamtawde_2-1676535151592.png" alt="shyamtawde_2-1676535151592.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Feb 2023 08:14:55 GMT</pubDate>
    <dc:creator>shyamtawde</dc:creator>
    <dc:date>2023-02-16T08:14:55Z</dc:date>
    <item>
      <title>desire date and time not reflecting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/desire-date-and-time-not-reflecting/m-p/859129#M339459</link>
      <description>&lt;P&gt;&lt;STRONG&gt;date(DOD) time (adt) is in numeric format only but&amp;nbsp; in output exstdtc and&amp;nbsp;exendtc showing like below image&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shyamtawde_1-1676535047674.png" style="width: 572px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80457i29CA394A5EE19A47/image-dimensions/572x322?v=v2" width="572" height="322" role="button" title="shyamtawde_1-1676535047674.png" alt="shyamtawde_1-1676535047674.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;below is the code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if dod ne . then doastdtn=input(strip(compress(dod,"-")),??date7.);&lt;BR /&gt;if doastdtn ne . then doastdt=strip(put(doastdtn,??date9.));&lt;BR /&gt;if adt ne . then doasttm=strip(adt);&lt;BR /&gt;if adt ne . then doasttmn=input(adt,??time5.);&lt;BR /&gt;if length(strip(doasttm)) le 7 and index(doasttm,":") eq 2 then doasttm="0"||strip(doasttm);&lt;/P&gt;&lt;P&gt;%dateder(indate=doastdt, intime=doasttm, outdt=exstdtc);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Log:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shyamtawde_2-1676535151592.png" style="width: 753px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80458i262AE71A934A7463/image-dimensions/753x424?v=v2" width="753" height="424" role="button" title="shyamtawde_2-1676535151592.png" alt="shyamtawde_2-1676535151592.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 08:14:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/desire-date-and-time-not-reflecting/m-p/859129#M339459</guid>
      <dc:creator>shyamtawde</dc:creator>
      <dc:date>2023-02-16T08:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: desire date and time not reflecting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/desire-date-and-time-not-reflecting/m-p/859136#M339463</link>
      <description>&lt;P&gt;Your post does not include enough information to help answer the question.&amp;nbsp; Posting test data in the form of a datastep is required.&amp;nbsp; For instance, there is no example of what dod or adt is?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your text is all in opposites, you say dod is numeric, but line 221 is clearly telling you an issue as you have compress() which requires a text var, with dod var which is numeric.&lt;/P&gt;
&lt;P&gt;Also, there is no error, only telling you you have differing types for your variables.&amp;nbsp; If its not working, try simplifying your code down, only do one function per run, e.g. see what the compress does, then what the inputs do, this is stepwise error analysis.&amp;nbsp; Only build up long complicated multi calls when you know bits work.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 08:44:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/desire-date-and-time-not-reflecting/m-p/859136#M339463</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2023-02-16T08:44:29Z</dc:date>
    </item>
  </channel>
</rss>

