<?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>Question Re: DATEFORMAT / timestamp_format behavior discrepancy with documentation in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/dateformat-timestamp-format-behavior-discrepancy-with-documentation/qaa-p/13836960#M4867803</link>
    <description>&lt;P&gt;This is documented behavior under the &lt;A href="http://dcx.sap.com/index.html#1201/en/dbadmin/timestamp-format-option.html"&gt;TIMESTAMP_FORMAT&lt;/A&gt; DCX article&lt;/P&gt;
&lt;P&gt;"MM Two-digit month, &lt;STRONG&gt;&lt;EM&gt;or two-digit minutes if following a colon (as in HH:MM)&lt;/EM&gt;&lt;/STRONG&gt; "&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2017 12:11:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2017-03-30T12:11:47Z</dc:date>
    <item>
      <title>DATEFORMAT / timestamp_format behavior discrepancy with documentation</title>
      <link>https://community.sap.com/t5/technology-q-a/dateformat-timestamp-format-behavior-discrepancy-with-documentation/qaq-p/13836959</link>
      <description>&lt;P&gt;According to the &lt;A href="http://dcx.sap.com/index.html#sqla170/en/html/81f627596ce21014888b92bc7ad3e3f9.html" target="_blank"&gt;documentation&lt;/A&gt; for DATEFORMAT / timestamp_format, MM represents month.&lt;/P&gt;
&lt;P&gt;However, consider the output of:&lt;/P&gt;
&lt;PRE&gt;SELECT DATEFORMAT('2017-12-30 12:34:56.789','YYYY:MM:DD:HH:NN:SS:SSS')&lt;/PRE&gt;

&lt;P&gt;The expected value would be:&lt;/P&gt;
&lt;PRE&gt;'2017:12:30:12:34:56:789'&lt;/PRE&gt;

&lt;P&gt;However, the function returns:&lt;/P&gt;
&lt;PRE&gt;'2017:34:30:12:34:56:789'&lt;/PRE&gt;

&lt;P&gt;It appears that the database server (dbsrv12 version 17.0.4.2053, also tested on the last 12.0.1 EBF with same result) considers MM to be an alias for NN if preceded by a colon. That is not the documented behavior. I recent ran into an application that required all date parts to be separated by colons.&lt;/P&gt;
&lt;P&gt;Of course, the workaround is YEAR(...)||':'||MONTH(...)||... but if the existing behavior is by design, should the documentation not reflect that? Or is this a bug? I presume that since the behavior seems to be specific to colons, that it is intentional.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 11:35:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dateformat-timestamp-format-behavior-discrepancy-with-documentation/qaq-p/13836959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-03-30T11:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: DATEFORMAT / timestamp_format behavior discrepancy with documentation</title>
      <link>https://community.sap.com/t5/technology-q-a/dateformat-timestamp-format-behavior-discrepancy-with-documentation/qaa-p/13836961#M4867804</link>
      <description>&lt;P&gt;Can't tell on the intent/bug issue, but using a standard format and then replacing the delimiter might also do the trick...&lt;/P&gt;
&lt;P&gt;SELECT REPLACE(DATEFORMAT('2017-12-30 12:34:56.789','YYYY.MM.DD:HH:NN:SS:SSS'), '.', ':')&lt;/P&gt;
&lt;P&gt;returns '2017:12:30:12:34:56:780' (note the final zero) with v12.0.1.4403.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 12:06:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dateformat-timestamp-format-behavior-discrepancy-with-documentation/qaa-p/13836961#M4867804</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2017-03-30T12:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: DATEFORMAT / timestamp_format behavior discrepancy with documentation</title>
      <link>https://community.sap.com/t5/technology-q-a/dateformat-timestamp-format-behavior-discrepancy-with-documentation/qaa-p/13836960#M4867803</link>
      <description>&lt;P&gt;This is documented behavior under the &lt;A href="http://dcx.sap.com/index.html#1201/en/dbadmin/timestamp-format-option.html"&gt;TIMESTAMP_FORMAT&lt;/A&gt; DCX article&lt;/P&gt;
&lt;P&gt;"MM Two-digit month, &lt;STRONG&gt;&lt;EM&gt;or two-digit minutes if following a colon (as in HH:MM)&lt;/EM&gt;&lt;/STRONG&gt; "&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 12:11:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dateformat-timestamp-format-behavior-discrepancy-with-documentation/qaa-p/13836960#M4867803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-03-30T12:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: DATEFORMAT / timestamp_format behavior discrepancy with documentation</title>
      <link>https://community.sap.com/t5/technology-q-a/dateformat-timestamp-format-behavior-discrepancy-with-documentation/qaa-p/13836962#M4867805</link>
      <description>&lt;P&gt;Yep. I must be blind.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2017 14:33:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dateformat-timestamp-format-behavior-discrepancy-with-documentation/qaa-p/13836962#M4867805</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-03-31T14:33:37Z</dc:date>
    </item>
  </channel>
</rss>

