<?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>issue with converting date to string</title><link>https://community.appian.com/discussions/f/rules/24125/issue-with-converting-date-to-string</link><description>Hi there, 
 I need to use the date string in format &amp;quot;YMMd&amp;quot;, for example, &amp;quot;20220329&amp;quot; for today. 
 I am using the datetext function: datetext(today(), &amp;quot;YMMd&amp;quot;), if today() function return &amp;quot;03/29/2022&amp;quot;, then the datetext(today(), &amp;quot;YMMd&amp;quot;) will return &amp;quot;20200328</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: issue with converting date to string</title><link>https://community.appian.com/thread/93374?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 17:30:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a55e5483-1414-45cb-bb3b-29b971a82bd5</guid><dc:creator>Sikhi Bhamidipalli</dc:creator><description>&lt;p&gt;In&amp;nbsp;general, projects will have a global/common rule by APP_returnToday, which wraps the today in local.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If not, today() will give you the last day&amp;#39;s date until it passes GMT 12.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with converting date to string</title><link>https://community.appian.com/thread/93363?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 16:36:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0110b614-3996-4113-b935-e48e67f77fbc</guid><dc:creator>linp0001</dc:creator><description>&lt;p&gt;thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with converting date to string</title><link>https://community.appian.com/thread/93288?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 08:27:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:24852612-78b2-45b7-9668-385883891c16</guid><dc:creator>sairohitd054766</dc:creator><description>&lt;p&gt;text(today(),&amp;quot;yyyyMMdd&amp;quot;)&amp;nbsp;&lt;br /&gt;This returns the expected one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with converting date to string</title><link>https://community.appian.com/thread/93095?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2022 23:07:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:46011888-57fa-4b99-a13c-427b2358dfbb</guid><dc:creator>linp0001</dc:creator><description>&lt;p&gt;thanks, maybe the timezone setting is not correct, but I am ok now with using text() function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with converting date to string</title><link>https://community.appian.com/thread/93012?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 14:23:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c54b44e3-5d43-4785-a823-ae26b66908e5</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;yes, i am getting the same result .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with converting date to string</title><link>https://community.appian.com/thread/93011?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 14:12:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:427822ce-779e-4610-a80f-87bcf0a1eac5</guid><dc:creator>linp0001</dc:creator><description>&lt;p&gt;if you run just today(), you got the same date?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with converting date to string</title><link>https://community.appian.com/thread/93010?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 14:11:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a7f1b514-8b65-409e-b6d9-f4185cdc39e4</guid><dc:creator>linp0001</dc:creator><description>&lt;p&gt;Thanks Mike, it&amp;#39;s working.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with converting date to string</title><link>https://community.appian.com/thread/93009?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 14:01:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fc9aab26-6516-45f1-8014-e509ae3d0b3d</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;FWIW I always seem to have better results using &amp;quot;text()&amp;quot; for these, rather than &amp;quot;datetext()&amp;quot;.&amp;nbsp; Also as Princy noted above already, you need to account for GMT conversion - I would suggest trying the same code but with &amp;quot;today()&amp;quot; wrapped in &amp;quot;local()&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with converting date to string</title><link>https://community.appian.com/thread/92991?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 03:55:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5ce94687-0862-455e-9a29-6ed6ebeb2b11</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;Hi, I am using the same code which you are using and i am getting expected result, please see below. I would suggest you check your environment time zone.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1648612506687v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with converting date to string</title><link>https://community.appian.com/thread/92990?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 03:30:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:35a95fc7-c4a5-4cce-ad01-a8be31e309ad</guid><dc:creator>Prin18</dc:creator><description>&lt;p&gt;today() function&amp;nbsp;returns the current day in Greenwich Mean Time (GMT) so the result may differ from the current day in your local timezone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with converting date to string</title><link>https://community.appian.com/thread/92989?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 02:24:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a83aa123-d4c1-49ac-8d2d-3860a4795edc</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;Date format should be &amp;quot;yyyyMMdd&amp;quot;&lt;/p&gt;
&lt;p&gt;Also be aware of this:&amp;nbsp;&lt;a href="/support/w/kb/575/kb-1344-datetext-returns-one-day-before-expected-date"&gt;community.appian.com/.../kb-1344-datetext-returns-one-day-before-expected-date&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with converting date to string</title><link>https://community.appian.com/thread/92988?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 00:50:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0ef463c4-eefb-415a-8773-4dda3598ffc4</guid><dc:creator>linp0001</dc:creator><description>&lt;p&gt;sorry&amp;nbsp;the&lt;span&gt;&amp;nbsp;datetext(today(), &amp;quot;YMMd&amp;quot;) return &amp;quot;20220328&amp;quot;, not &amp;quot;20200328&amp;quot;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>