<?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: How do I create this strange and exotic format ---&amp;gt; DDMMMYYYY:HH:MM:SS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/603966#M175031</link>
    <description>&lt;P&gt;I would share the Oracle code in SAS but it's, eh, "sensitive" and it would take waaaaay too long for me to edit it to just show the barebones code&amp;nbsp;(several hundred lines at least, hence the macros to replace these crazy dates!).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I've troubleshooted this in further detail, and it turns out that the end of month variable is actually resolving like so: 30SEP2019:00:00:00 instead of what we thought it would be: 30SEP2019:23:59:59.&amp;nbsp; What would I do to take the 23:59:59 and make it 00:00:00?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the meantime, I'm going to mark your original proposed solution as an answer since it gave me the most guidance and aid.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Nov 2019 20:49:04 GMT</pubDate>
    <dc:creator>davidvalentine</dc:creator>
    <dc:date>2019-11-13T20:49:04Z</dc:date>
    <item>
      <title>How do I create this strange and exotic format ---&gt; DDMMMYYYY:HH:MM:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/602804#M174567</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for help converting my date into the following strange and exotic format: DDMMMYYYY:HH:MM:SS for use in a WHERE clause.&amp;nbsp; First things first: my SAS version is 7.15 32-bit.&amp;nbsp; The code I have is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*Date macro is&amp;nbsp;below;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%Let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; End_of_lmonth = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(intnx(Month,&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(today()),-2,end),Date11.);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;%Put Check to see if this is the end of the last two&amp;nbsp;months.&amp;nbsp; If not, fix it.&amp;nbsp; &amp;amp;End_of_lmonth;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;inobs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1000&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&amp;nbsp; select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; work.accnt&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&amp;nbsp; where&amp;nbsp;accnt&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;.snpsht_dt&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'&amp;amp;end_of_lmonth';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;QUIT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although this runs, it returns no rows.&amp;nbsp; The End_of_lmonth variable I created resolves to '30-SEP-2019', but when I replace the &amp;amp;end_of_lmonth variable in the Where clause with '30-SEP-2019', the query runs and pulls in data.&amp;nbsp; In other words, the query below works just fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;inobs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1000&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&amp;nbsp; select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; work.accnt&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&amp;nbsp; where&amp;nbsp;accnt&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;.snpsht_dt&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'30-SEP-2019';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;QUIT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I examined the results further, this works because&amp;nbsp;column holding the data comes out to a format like this: 30SEP2019:00:00:00 instead of 30-SEP-2019.&amp;nbsp; So how can I create my macro variable to be in the strange and exotic format that works?&amp;nbsp; Any help is truly appreciated!!!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 18:27:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/602804#M174567</guid>
      <dc:creator>davidvalentine</dc:creator>
      <dc:date>2019-11-08T18:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create this strange and exotic format ---&gt; DDMMMYYYY:HH:MM:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/602836#M174582</link>
      <description>&lt;P&gt;Is your &lt;FONT color="#0000ff" face="Courier New"&gt;accnt&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;.snpsht_dt&lt;/FONT&gt;&amp;nbsp;a character variable? If it is character then you likely need to manipulate both your variable AND the date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not then it should be a datetime since you show DDMMMYYYY:HH:MM:SS&amp;nbsp;and I don't see any attempt to use any time portion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the value is a datetime value then you likely should not format the macro value (why a macro at all?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; where datepart( accnt.snpsht_dt) = intnx('month',today(),-2,'E');&lt;/PRE&gt;
&lt;P&gt;If the value is in a different data base then you may need to mention that.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 19:38:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/602836#M174582</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-11-08T19:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create this strange and exotic format ---&gt; DDMMMYYYY:HH:MM:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/602847#M174592</link>
      <description>&lt;P&gt;Hi ballardw!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Accnt.snpsht_dt is a date variable. I am using a macro because I left the other portion of code that references both the beginning and end of the month in several Where clauses out for the sake of brevity, so I figured it’ll be easier to just create two macro variables that give me the beginning and end of the month and just reference those two variables several times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as the value being in a different data base, my Proc SQL is connecting to an Oracle database if that’s what you mean. I’ll give this a go and reply back if this works. Thank you, ballardw!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 19:53:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/602847#M174592</guid>
      <dc:creator>davidvalentine</dc:creator>
      <dc:date>2019-11-08T19:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create this strange and exotic format ---&gt; DDMMMYYYY:HH:MM:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/602852#M174594</link>
      <description>&lt;P&gt;You seem a little confused about how dates and times work in SAS.&amp;nbsp; SAS stores all of them as numbers. SAS only has two variable types, floating point numbers and fixed length character strings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date values, like the output of the TODAY() function, are the number of days since 1960. Time and Datetime values are the number of seconds. Time is from midnight and Datetime is from 1960.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The style of displaying datetime values you show is the default format, DATETIME,&amp;nbsp; that SAS uses to for the display of datetime values. Nothing exotic about it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to create a datetime value using INTNX() function you need to use a datetime interval and datetime starting value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let start=%sysfunc(intnx(dtmonth,%sysfunc(datetime()),-2,e),datetime20.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;1491  %put &amp;amp;=start;
START=30SEP2019:23:59:59&lt;/PRE&gt;
&lt;P&gt;If you want to use that string to actually compare to another datetime value then you need to convert it to a datetime literal.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where accnt.snpsht_dt between "&amp;amp;start"dt and "&amp;amp;end"dt&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you are not using the macro variable to create text that humans need to read you can just leave the value as the raw number of seconds instead of formatting it (converting it to text) with the DATETIME format.&amp;nbsp; Then the code is a little easier to write.&lt;/P&gt;
&lt;P&gt;So you might use this to find datetime values in the previous month.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let start=%sysfunc(intnx(dtmonth,%sysfunc(datetime()),-1,b));
%let end=%sysfunc(intnx(dtmonth,&amp;amp;start,0,e));
...
where accnt.snpsht_dt between &amp;amp;start and &amp;amp;end &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 20:16:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/602852#M174594</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-08T20:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create this strange and exotic format ---&gt; DDMMMYYYY:HH:MM:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/602878#M174604</link>
      <description>&lt;P&gt;If I hear you right:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The macro variable resolves properly, and&lt;/LI&gt;
&lt;LI&gt;The hard-coded version produces the correct results.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;In that case, all you need to change is this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;'&amp;amp;end_of_lmonth'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Single quotes suppress all macro activity so &amp;amp;END_OF_LMONTH is not resolving in&amp;nbsp; your query.&amp;nbsp; Just use double quotes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;"&amp;amp;end_of_lmonth"&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Nov 2019 21:09:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/602878#M174604</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-11-08T21:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create this strange and exotic format ---&gt; DDMMMYYYY:HH:MM:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/603588#M174880</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is really helpful information; I'll give your solutions a go and let you know if they do the trick.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 14:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/603588#M174880</guid>
      <dc:creator>davidvalentine</dc:creator>
      <dc:date>2019-11-12T14:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create this strange and exotic format ---&gt; DDMMMYYYY:HH:MM:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/603589#M174881</link>
      <description>&lt;P&gt;Hi Astounding,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I never knew this about the single vs. double quotes; I'll definitely try this.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 14:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/603589#M174881</guid>
      <dc:creator>davidvalentine</dc:creator>
      <dc:date>2019-11-12T14:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create this strange and exotic format ---&gt; DDMMMYYYY:HH:MM:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/603931#M175013</link>
      <description>&lt;P&gt;Hello Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I gave your advice a go but I received an error I never saw before.&amp;nbsp; It is below :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ERROR: ORACLE prepare error: ORA-00920: invalid relational operator.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is in regards to using all of the suggested solutions that were presented (&lt;SPAN class="token statement"&gt;where&lt;/SPAN&gt; accnt&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;snpsht_dt between &lt;SPAN class="token string"&gt;"&amp;amp;start"&lt;/SPAN&gt;dt and &lt;SPAN class="token string"&gt;"&amp;amp;end"&lt;/SPAN&gt;dt and &lt;SPAN class="token statement"&gt;where&lt;/SPAN&gt; accnt&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;snpsht_dt between &lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;start and &lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;end).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would you suggest I do next?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 18:49:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/603931#M175013</guid>
      <dc:creator>davidvalentine</dc:creator>
      <dc:date>2019-11-13T18:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create this strange and exotic format ---&gt; DDMMMYYYY:HH:MM:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/603935#M175015</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/295099"&gt;@davidvalentine&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I gave your advice a go but I received an error I never saw before.&amp;nbsp; It is below :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;ERROR: ORACLE prepare error: ORA-00920: invalid relational operator.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is in regards to using all of the suggested solutions that were presented (&lt;SPAN class="token statement"&gt;where&lt;/SPAN&gt; accnt&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;snpsht_dt between &lt;SPAN class="token string"&gt;"&amp;amp;start"&lt;/SPAN&gt;dt and &lt;SPAN class="token string"&gt;"&amp;amp;end"&lt;/SPAN&gt;dt and &lt;SPAN class="token statement"&gt;where&lt;/SPAN&gt; accnt&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;snpsht_dt between &lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;start and &lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;end).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What would you suggest I do next?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Show what code you actually gave to Oracle that caused it to produce such a message. Note you cannot use SAS syntax in code you are passing directly to Oracle to use.&amp;nbsp; If you let SAS convert the code into SQL for you then turn on logging and see what code it generated.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 18:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/603935#M175015</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-13T18:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create this strange and exotic format ---&gt; DDMMMYYYY:HH:MM:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/603966#M175031</link>
      <description>&lt;P&gt;I would share the Oracle code in SAS but it's, eh, "sensitive" and it would take waaaaay too long for me to edit it to just show the barebones code&amp;nbsp;(several hundred lines at least, hence the macros to replace these crazy dates!).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I've troubleshooted this in further detail, and it turns out that the end of month variable is actually resolving like so: 30SEP2019:00:00:00 instead of what we thought it would be: 30SEP2019:23:59:59.&amp;nbsp; What would I do to take the 23:59:59 and make it 00:00:00?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the meantime, I'm going to mark your original proposed solution as an answer since it gave me the most guidance and aid.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 20:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/603966#M175031</guid>
      <dc:creator>davidvalentine</dc:creator>
      <dc:date>2019-11-13T20:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create this strange and exotic format ---&gt; DDMMMYYYY:HH:MM:SS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/603973#M175038</link>
      <description>&lt;P&gt;You could use another INTNX() to move the start of the day.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;intnx('dtday',intnx('dtmonth',XXX,-1,'e'),0,'b')&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or if you are just generating strings you could just generate the date part and add the zero time part as constant text.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let end=%sysfunc(intnx(month,%sysfunc(today()),-1,e),date9.):00:00:00;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Nov 2019 20:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-this-strange-and-exotic-format-gt-DDMMMYYYY-HH/m-p/603973#M175038</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-13T20:56:36Z</dc:date>
    </item>
  </channel>
</rss>

