<?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: SAP CPI dateTrans Function Returning Incorrect Date D... in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/sap-cpi-datetrans-function-returning-incorrect-date-during-conversion/qaa-p/14500955#M4949945</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;2027-03-07 is exactly what you get when the input format has &lt;CODE&gt;MM&lt;/CODE&gt; (month) in the time part instead of &lt;CODE&gt;mm&lt;/CODE&gt; (minutes): the 15 from 18:15 is read as month 15, and month 15 of 2026 is March 2027.&lt;/P&gt;&lt;P&gt;The mapping functions use Java's SimpleDateFormat, which is lenient by default, so instead of failing it just rolls the date over. I ran your input value through SimpleDateFormat with a few patterns:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;yyyy-MM-dd HH:mm:ss  -&amp;gt; 2026-10-07   (correct)
yyyy-MM-dd HH:MM:ss  -&amp;gt; 2027-03-07   (your result)
yyyy-mm-dd HH:MM:ss  -&amp;gt; 2027-03-07
YYYY-MM-dd HH:mm:ss  -&amp;gt; 2025-12-28   (week year)
yyyy-MM-DD HH:mm:ss  -&amp;gt; 2026-01-07   (day of year)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So check the input format in the dateTrans settings letter by letter: it must be &lt;CODE&gt;yyyy-MM-dd HH:mm:ss&lt;/CODE&gt;, with lowercase &lt;CODE&gt;mm&lt;/CODE&gt; for minutes and lowercase &lt;CODE&gt;yyyy&lt;/CODE&gt; and &lt;CODE&gt;dd&lt;/CODE&gt;. Case matters in every letter.&lt;/P&gt;&lt;P&gt;Note: I tested the pattern behavior in plain Java, not on a CPI tenant.&lt;/P&gt;</description>
    <pubDate>Sat, 10 Oct 2026 07:53:15 GMT</pubDate>
    <dc:creator>AlexandrePassarelli</dc:creator>
    <dc:date>2026-10-10T07:53:15Z</dc:date>
    <item>
      <title>SAP CPI dateTrans Function Returning Incorrect Date During Conversion</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cpi-datetrans-function-returning-incorrect-date-during-conversion/qaq-p/14498938</link>
      <description>&lt;P&gt;We are using the &lt;CODE&gt;dateTrans&lt;/CODE&gt; function in SAP Cloud Integration (CPI) to convert a datetime value from the format:&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;yyyy-MM-dd HH:mm:ss&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;to:&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;yyyy-MM-dd&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;However, the &lt;CODE&gt;dateTrans&lt;/CODE&gt; function is producing an incorrect output.&lt;/P&gt;&lt;P&gt;Input&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;2026-10-07 18:15:00&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;Expected Output&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;2026-10-07&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;Actual Output&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;2027-03-07&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;The input date is being converted to a completely different date, even though the expected behavior is only to remove the time portion and retain the date.&lt;/P&gt;&lt;P&gt;Steps to Reproduce&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a mapping in SAP Cloud Integration.&lt;/LI&gt;&lt;LI&gt;Use the &lt;CODE&gt;dateTrans&lt;/CODE&gt; function for date conversion.&lt;/LI&gt;&lt;LI&gt;Provide the input value:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;CODE&gt;2026-10-07 18:15:00&lt;/CODE&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Configure the conversion from:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;CODE&gt;yyyy-MM-dd HH:mm:ss&lt;/CODE&gt; to: &lt;CODE&gt;yyyy-MM-dd&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2026 15:15:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cpi-datetrans-function-returning-incorrect-date-during-conversion/qaq-p/14498938</guid>
      <dc:creator>Adani_Basis_Lead</dc:creator>
      <dc:date>2026-10-07T15:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CPI dateTrans Function Returning Incorrect Date D...</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cpi-datetrans-function-returning-incorrect-date-during-conversion/qaa-p/14500955#M4949945</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;2027-03-07 is exactly what you get when the input format has &lt;CODE&gt;MM&lt;/CODE&gt; (month) in the time part instead of &lt;CODE&gt;mm&lt;/CODE&gt; (minutes): the 15 from 18:15 is read as month 15, and month 15 of 2026 is March 2027.&lt;/P&gt;&lt;P&gt;The mapping functions use Java's SimpleDateFormat, which is lenient by default, so instead of failing it just rolls the date over. I ran your input value through SimpleDateFormat with a few patterns:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;yyyy-MM-dd HH:mm:ss  -&amp;gt; 2026-10-07   (correct)
yyyy-MM-dd HH:MM:ss  -&amp;gt; 2027-03-07   (your result)
yyyy-mm-dd HH:MM:ss  -&amp;gt; 2027-03-07
YYYY-MM-dd HH:mm:ss  -&amp;gt; 2025-12-28   (week year)
yyyy-MM-DD HH:mm:ss  -&amp;gt; 2026-01-07   (day of year)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So check the input format in the dateTrans settings letter by letter: it must be &lt;CODE&gt;yyyy-MM-dd HH:mm:ss&lt;/CODE&gt;, with lowercase &lt;CODE&gt;mm&lt;/CODE&gt; for minutes and lowercase &lt;CODE&gt;yyyy&lt;/CODE&gt; and &lt;CODE&gt;dd&lt;/CODE&gt;. Case matters in every letter.&lt;/P&gt;&lt;P&gt;Note: I tested the pattern behavior in plain Java, not on a CPI tenant.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Oct 2026 07:53:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cpi-datetrans-function-returning-incorrect-date-during-conversion/qaa-p/14500955#M4949945</guid>
      <dc:creator>AlexandrePassarelli</dc:creator>
      <dc:date>2026-10-10T07:53:15Z</dc:date>
    </item>
  </channel>
</rss>

