<?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>Why my ER is taking wrong value of date.</title><link>https://community.appian.com/discussions/f/new-to-appian/26134/why-my-er-is-taking-wrong-value-of-date</link><description>Hi all, 
 I am trying to take a date value from a DB(which I am writing in the Expression value below) and once I am inputting it in rule input it is changing my date value(Refer Value field): 
 
 
 
 Can anyone guide me what I am doing wrong, I need</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Why my ER is taking wrong value of date.</title><link>https://community.appian.com/thread/102454?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 17:36:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6a544d5e-cd98-4aa9-bf8b-12937ebb91b7</guid><dc:creator>maryl0003</dc:creator><description>&lt;p&gt;Exactly!&lt;/p&gt;
&lt;p&gt;Thank you Mike, I got confused a bit in that in the start.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why my ER is taking wrong value of date.</title><link>https://community.appian.com/thread/102453?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 17:35:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1506c64f-3d54-4407-bf12-91ec1c48cc75</guid><dc:creator>maryl0003</dc:creator><description>&lt;p&gt;No, We are storing the date in database as date type itself. But the date is stored in this format(2022-10-03) in the DB. Appian is automatically fetching it in correct format on Interface. I got confused in the start, although its resolved now. Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why my ER is taking wrong value of date.</title><link>https://community.appian.com/thread/102443?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 13:59:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0c390aa4-59f9-4163-ba92-0a5c953e39ad</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The exact expression `2022-10-03` (note no quotation marks etc) will evaluate as a math operation, i.e. &amp;quot;2022 minus 10 minus 3&amp;quot;, and return an integer value, which Appian will try to interpret as a date (and of course will be very wrong).&lt;/p&gt;
&lt;p&gt;Note that if your DB columns are set to the &amp;quot;Date&amp;quot; data type, they will be displayed there as YYYY-MM-DD formatting, however this is just the display mode.&amp;nbsp; Appian will actually receive a proper &amp;quot;date&amp;quot; data type when querying the data from the DB, which in Appian will display with the default Appian date formatting.&amp;nbsp; There should be no need (assuming the date is stored in the DB as a date and not as text) to have to play with manually parsing the value back into a Date from a YYYY-MM-DD formatted text string.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why my ER is taking wrong value of date.</title><link>https://community.appian.com/thread/102434?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 10:59:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2196b4e4-3fcc-4e1a-9181-ade76005edbd</guid><dc:creator>maryl0003</dc:creator><description>&lt;p&gt;Splitting and then Reversing worked well in this case, thanks &lt;a href="/members/gabriele.camilli"&gt;Gabriele Camilli&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why my ER is taking wrong value of date.</title><link>https://community.appian.com/thread/102433?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 10:58:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:52b3753b-e304-4b97-8303-dbeac0233378</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Is there a specific reason to store a date as a string in the database? Using a date field would avoid all the hassle.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why my ER is taking wrong value of date.</title><link>https://community.appian.com/thread/102431?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 10:17:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:efe8f6bb-c7e1-4595-ad64-de1af4fc057c</guid><dc:creator>Gabriele Camilli</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If it&amp;#39;s consistent just use&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;todate(
joinarray(
reverse(
split(ri!date,&amp;quot;-&amp;quot;)
),
&amp;quot;/&amp;quot;
)
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I guess that the DB column it&amp;#39;s string so note that &lt;em&gt;ri!date&amp;nbsp;&lt;/em&gt;should be of type text&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why my ER is taking wrong value of date.</title><link>https://community.appian.com/thread/102430?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 09:47:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:af7a0733-bf5f-4254-89c4-d3cb98a7a33f</guid><dc:creator>maryl0003</dc:creator><description>&lt;p&gt;Thanks Shalini, but how can we convert &amp;quot;&lt;strong&gt;2022-10-03&lt;/strong&gt;&amp;quot; that is coming from database to &amp;quot;&lt;span&gt;&lt;strong&gt;03-10-2022&lt;/strong&gt;&amp;quot; ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why my ER is taking wrong value of date.</title><link>https://community.appian.com/thread/102429?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 09:41:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:385f0eea-31d1-4f14-90b2-5a40e89fb9e1</guid><dc:creator>shalini</dc:creator><description>&lt;p&gt;Use todate(&amp;quot;03-10-2022&amp;quot;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>