<?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/"><channel><title>KB-1344 Datetext() returns one day before expected date</title><link>https://community.appian.com/support/w/kb/575/kb-1344-datetext-returns-one-day-before-expected-date</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-1344 Datetext() returns one day before expected date</title><link>https://community.appian.com/support/w/kb/575/kb-1344-datetext-returns-one-day-before-expected-date</link><pubDate>Wed, 17 May 2017 19:02:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a018f980-8f55-43a6-baf7-fbc22c7874b9</guid><dc:creator>Nick Vigilante</dc:creator><comments>https://community.appian.com/support/w/kb/575/kb-1344-datetext-returns-one-day-before-expected-date#comments</comments><description>Current Revision posted to Appian Knowledge Base by Nick Vigilante on 5/17/2017 7:02:30 PM&lt;br /&gt;
&lt;h2&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;When a user timezone is GMT-1 and below, the function datetext() returns a day prior to the expected date.&lt;/p&gt;
&lt;p&gt;For example, a user with Eastern Time(America/New_York) set as their timezone will see &amp;quot;2017/05/08&amp;quot; as a result of this expression:&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;datetext(date(2017, 05, 09), &amp;quot;yyyy/MM/dd&amp;quot;)&lt;/pre&gt;
&lt;h2&gt;Cause&lt;/h2&gt;
&lt;p&gt;This issue has been reported to the Appian product team. The reference number for this issue is&amp;nbsp;&lt;strong&gt;AN-43209.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Action&lt;/h2&gt;
&lt;p&gt;Wrap the date with the gmt() function:&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;datetext(gmt(date(2017, 05, 09)), &amp;quot;yyyy/MM/dd&amp;quot;)&lt;/pre&gt;
&lt;h2&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to all versions of Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: May 2017&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: known issues, expression rules, application design, open issues&lt;/div&gt;
</description></item></channel></rss>