<?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: Workato bug? The to_date function assumes a 4 digit year and ignores input format in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/workato-bug-the-to-date-function-assumes-a-4-digit-year-and/m-p/12055#M4634</link>
    <description>&lt;P&gt;I think you need this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://systematic.workato.com/t5/workato-pros-discussion-board/need-to-change-date-format/m-p/5503" target="_blank"&gt;https://systematic.workato.com/t5/workato-pros-discussion-board/need-to-change-date-format/m-p/5503&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Mar 2026 17:11:20 GMT</pubDate>
    <dc:creator>gary1</dc:creator>
    <dc:date>2026-03-27T17:11:20Z</dc:date>
    <item>
      <title>Workato bug? The to_date function assumes a 4 digit year and ignores input format</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/workato-bug-the-to-date-function-assumes-a-4-digit-year-and/m-p/12053#M4633</link>
      <description>&lt;P&gt;Hello Forum People&lt;/P&gt;&lt;P&gt;So, I’ve got a STRING value of… "26/03/26 14:51:06" from one system that I need to convert to a date for use when making an API call to another system. According to the &lt;A href="https://docs.workato.com/en/formulas/date-formulas.html#to-date" rel="noopener" target="_blank"&gt;Workato documentation&lt;/A&gt;&amp;nbsp; the .to_date() function is what I want.&lt;/P&gt;&lt;P&gt;The “input format” of my sample string is obviously DD/MM/YY.&amp;nbsp; The documentation is very clear that the format parameter for to_date “defines only the &lt;STRONG&gt;input&lt;/STRONG&gt; formula”.&lt;/P&gt;&lt;P&gt;But when I try to use - MYSTRING.to_date(format: "DD/MM/YY") Workato throws an error – “Error calculating input for field 'DateConv': invalid date”.&lt;/P&gt;&lt;P&gt;If I use - MYSTRING.to_date(format: "DD/MM/YYYY") it works although obviously I'm lying to it about the format being passed in being a 4 digit year.&amp;nbsp; However,&amp;nbsp;the result it gives me is 0026-03-26.&lt;/P&gt;&lt;P&gt;So having insisted on a 4 digit year format it then treats my 26 as in the first millennium.&amp;nbsp; So it looks like I'd then have to add 2000 years to arrive at the correct year if I have a 2 digit year format!&amp;nbsp; The following works and gives me the result that I want (but I need a long shower afterwards)...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grab.jpg" style="width: 509px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2637i7D3668E4A17EBFD1/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="grab.jpg" alt="grab.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(I have no control over the string being passed in.&amp;nbsp; Historically the format has been as per the sample, but it worries me that it might change in future).&lt;/P&gt;&lt;P&gt;But most importantly, this feels like a Workato bug in that the to_date function is ignoring the input format I specify, but is assuming a four digit year?&lt;/P&gt;&lt;P&gt;Thoughts on the possible bug?&amp;nbsp; Suggestions as to how best to convert my string to a date?&amp;nbsp; I could split up the string but then I'm making assumptions again about the input format being consistent.&lt;/P&gt;&lt;P&gt;Thanks for any insights offered in advance!&lt;/P&gt;&lt;P&gt;Russell&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 12:53:27 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/workato-bug-the-to-date-function-assumes-a-4-digit-year-and/m-p/12053#M4633</guid>
      <dc:creator>RussellJ</dc:creator>
      <dc:date>2026-03-27T12:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Workato bug? The to_date function assumes a 4 digit year and ignores input format</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/workato-bug-the-to-date-function-assumes-a-4-digit-year-and/m-p/12055#M4634</link>
      <description>&lt;P&gt;I think you need this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://systematic.workato.com/t5/workato-pros-discussion-board/need-to-change-date-format/m-p/5503" target="_blank"&gt;https://systematic.workato.com/t5/workato-pros-discussion-board/need-to-change-date-format/m-p/5503&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 17:11:20 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/workato-bug-the-to-date-function-assumes-a-4-digit-year-and/m-p/12055#M4634</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2026-03-27T17:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: Workato bug? The to_date function assumes a 4 digit year and ignores input format</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/workato-bug-the-to-date-function-assumes-a-4-digit-year-and/m-p/12056#M4635</link>
      <description>&lt;P&gt;Also, I don't think it's a bug. Having a two-digit year simply isn't enough data to accurately determine the correct century. Like a "50" could legitimately be 2050 or 1950, and there's simply no way to know the difference without additional context.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 17:13:14 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/workato-bug-the-to-date-function-assumes-a-4-digit-year-and/m-p/12056#M4635</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2026-03-27T17:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Workato bug? The to_date function assumes a 4 digit year and ignores input format</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/workato-bug-the-to-date-function-assumes-a-4-digit-year-and/m-p/12057#M4636</link>
      <description>&lt;P&gt;Hey Gary&lt;/P&gt;&lt;P&gt;Thanks for your replies (as always)!&lt;/P&gt;&lt;P&gt;I completely understand that any system when faced with a two digit year has to make assumptions.&amp;nbsp; And (especially since the fuss around Y2K) we all know how bad that can be.&amp;nbsp; But the documentation tells me that the function respects my input format.&amp;nbsp; And it doesn't.&amp;nbsp; And there's no mention of a 4 digit year requirement.&amp;nbsp; So I'm sticking with FAIL on that&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Appreciate your link to an earlier post - apologies, I should have searched the Forum first!&amp;nbsp; Interesting you also suggest adding 2k years as a workaround.&amp;nbsp; But it don't feel right!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Russell&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 17:31:55 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/workato-bug-the-to-date-function-assumes-a-4-digit-year-and/m-p/12057#M4636</guid>
      <dc:creator>RussellJ</dc:creator>
      <dc:date>2026-03-27T17:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Workato bug? The to_date function assumes a 4 digit year and ignores input format</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/workato-bug-the-to-date-function-assumes-a-4-digit-year-and/m-p/12058#M4637</link>
      <description>&lt;P&gt;Maybe I’m missing something, but the documentation says that the format is .&lt;SPAN&gt;to_date(format: "%m/%d/%y") and not “MM/DD/YY”&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 19:59:46 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/workato-bug-the-to-date-function-assumes-a-4-digit-year-and/m-p/12058#M4637</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2026-03-27T19:59:46Z</dc:date>
    </item>
  </channel>
</rss>

