<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>datetext() appears to increment the year if it&amp;#39;s used December27 -December 31st</title><link>https://community.appian.com/discussions/f/user-interface/23925/datetext-appears-to-increment-the-year-if-it-s-used-december27--december-31st</link><description>Noticed something strange when using the datetext() function on dates near the end of December. Using datetext() on dates December 27th or later display the next year rather than the correct one. Example below... 
 
 
 Am I using the datetext() function</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: datetext() appears to increment the year if it's used December27 -December 31st</title><link>https://community.appian.com/thread/92037?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 17:37:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:88c26760-abb2-4492-942d-71dc4c5d732c</guid><dc:creator>zakarym0001</dc:creator><description>&lt;p&gt;Awesome, great catch!&amp;nbsp; Switched to the all lower &amp;#39;yyyy&amp;#39; and everything looks as expected.&amp;nbsp;&amp;nbsp;&lt;span&gt;Thanks for the help!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: datetext() appears to increment the year if it's used December27 -December 31st</title><link>https://community.appian.com/thread/92033?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 16:59:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:05fb5a66-499c-4003-af6b-99cde8d5fa29</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Confirmed this behavior occurs for me in my 22.1 environment.&amp;nbsp; Good catch. &lt;span style="text-decoration:line-through;"&gt;I&amp;#39;d recommend opening a support case with Appian to serve as an official Bug Report.&lt;/span&gt;I don&amp;#39;t use dateText() very much because I usually find text() serves my purposes (and i use a custom expression rule with text() but wrapped in a null-checker, i.e. &lt;em&gt;rule!GLBL_saveText()&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Edit&lt;/strong&gt;&lt;/em&gt;: i just noticed the &amp;quot;format&amp;quot; parameter in the dateText function instructions say to write the year as &amp;quot;yyyy&amp;quot;, while yours are uppercase.&amp;nbsp; If you convert your &amp;quot;YYYY&amp;quot;s to lower case it appears to work.&amp;nbsp; From the &lt;a href="https://docs.appian.com/suite/help/21.4/fnc_scripting_datetext.html"&gt;documentation&lt;/a&gt;, it looks as if upper-case &amp;quot;Y&amp;quot; is used to indicate a special case called &amp;quot;&lt;a href="https://en.wikipedia.org/wiki/ISO_week_date"&gt;Week Year&lt;/a&gt;&amp;quot;.&amp;nbsp; This is the first I&amp;#39;ve heard of that but it looks as if it explains the quirk you&amp;#39;ve encountered.&lt;br /&gt;&lt;img height="213" src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1646845724402v1.png" width="385" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>