<?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>Data &amp;amp; Time in Records</title><link>https://community.appian.com/discussions/f/data/29973/data-time-in-records</link><description>Hello, 
 
 For storing date and time for (dateTime type variable) in record I&amp;#39;m using now() function. 
 But in record type its format is like : 9/10/2023 12:50 PM GMT+05:30 and in database it is of this format : 2023-09-10 08:06:33.100000. 
 I want in</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Data &amp; Time in Records</title><link>https://community.appian.com/thread/119079?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 11:46:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9ee1f2ea-d40a-4677-ac6a-913fd06637b6</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;This is so confusing, we constantly switch topics here ...&lt;/p&gt;
&lt;p&gt;Which of&amp;nbsp;your many problems do you want to discuss now?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data &amp; Time in Records</title><link>https://community.appian.com/thread/119070?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 11:27:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a95bcb83-7bb9-4083-bdb4-8b7fea7b8c62</guid><dc:creator>prachit0003</dc:creator><description>&lt;p&gt;I have records and relationship but I need columns from two tables that&amp;#39;s why created view and generate excel we need cdt, so how can I use records in that case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data &amp; Time in Records</title><link>https://community.appian.com/thread/119067?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 11:21:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c0b03ca7-ddea-4155-b0a4-7a60f614fe03</guid><dc:creator>anmolvijayvergiya</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/1665.Screenshot-2023_2D00_08_2D00_23-152716.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data &amp; Time in Records</title><link>https://community.appian.com/thread/119066?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 11:19:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0ddadf29-3b40-43c5-8683-a2544aa8cd1b</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Is that the same use case we discussed in another thread? The Appian Data Fabric feature is specifically made to simply managing and querying data from multiple sources. Create records and the relationships. Then you can easily query the data you need, without a view or a stored procedure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data &amp; Time in Records</title><link>https://community.appian.com/thread/119062?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 10:22:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0df75ad2-d443-4c17-8f73-06222193f9b3</guid><dc:creator>prachit0003</dc:creator><description>&lt;p&gt;Initially I was using view but my manager said after 5-6 years inside view the data will be large and fetching data will take time, so what will you use in such case and I preferred stored procedure.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The process is like : Inside interface I have two date and time field (dateFrom and dateTo) which is passed to process model by using a!startProcess and inside process model execute stored procedure smart service is used which takes dateFrom and dateTo as parameter and gives data between two dates and pass that data to Excel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data &amp; Time in Records</title><link>https://community.appian.com/thread/119055?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 09:57:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:087301a4-49db-44fb-8a27-6d7ba2a73f5f</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;&lt;a href="https://dba.stackexchange.com/questions/150158/preferred-way-to-store-datetime"&gt;https://dba.stackexchange.com/questions/150158/preferred-way-to-store-datetime&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;A common way of storing date/time data, employed &amp;quot;behind the scenes&amp;quot; by many products, is by converting it into a decimal value where the &amp;quot;date&amp;quot; is the integer portion of the decimal value, and the &amp;quot;time&amp;quot; is the fractional value. So, 1900-01-01 00:00:00 is stored as 0.0 and September 20th, 2016 9:34:00 is stored as 42631.39861. 42631 is the number of days since 1900-01-01. .39861 is the portion of time elapsed since midnight.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;But back to your question.&amp;nbsp;How am I supposed to answer that? I do not see your data, nor how you call that SP&amp;nbsp;from Appian.&lt;/p&gt;
&lt;p&gt;BTW, why do you create a SP for such a trivial query? You could easily do that with Appian records.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data &amp; Time in Records</title><link>https://community.appian.com/thread/119053?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 09:31:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fc951e2c-0b96-44ef-b2a7-6d12e032a5b5</guid><dc:creator>prachit0003</dc:creator><description>&lt;p&gt;So why I&amp;#39;m not getting the data after running the stored procedure&lt;/p&gt;
&lt;p&gt;My Stored Procedure&lt;/p&gt;
&lt;p&gt;SELECT&lt;br /&gt;TBA_BOOKING.BOOKING_ID,&lt;br /&gt;TBA_BOOKING.CUSTOMER_EMAIL,&lt;br /&gt;TBA_BOOKING.TRAVEL_FROM,&lt;br /&gt;TBA_BOOKING.TRAVEL_TO,&lt;br /&gt;TBA_BOOKING.LOCATION_FROM,&lt;br /&gt;TBA_BOOKING.LOCATION_TO,&lt;br /&gt;TBA_BOOKING.NO_OF_TRAVELERS,&lt;br /&gt;TBA_BOOKING.PACKAGE_TOTAL_COST,&lt;br /&gt;TBA_BOOKING.DURATION,&lt;br /&gt;TBA_BOOKING.FOOD_REQUIRED,&lt;br /&gt;TBA_BOOKING.FOOD_COST,&lt;br /&gt;TBA_BOOKING.FINAL_TOTAL_COST,&lt;br /&gt;TBA_BOOKING.STATUS_OF_TRAVEL_BOOKING_CANCELLATION,&lt;br /&gt;TBA_BOOKING.STATUS_OF_FOOD_BOOKING_CANCELLATION,&lt;br /&gt;TBA_BOOKING.CANCELLATION_FEES,&lt;br /&gt;TBA_BOOKING.CREATED_BY,&lt;br /&gt;TBA_BOOKING.CREATED_ON,&lt;br /&gt;TBA_TRAVEL_PACKAGE.PACKAGE_TYPE,&lt;br /&gt;TBA_TRAVEL_PACKAGE.ISFOOD_AVAILABLE,&lt;br /&gt;TBA_TRAVEL_PACKAGE.NO_OF_SEATS&lt;br /&gt;FROM TBA_BOOKING &lt;br /&gt;INNER JOIN TBA_TRAVEL_PACKAGE &lt;br /&gt;ON TBA_BOOKING.TRAVEL_ID = TBA_TRAVEL_PACKAGE.TRAVEL_ID &lt;br /&gt;WHERE TBA_BOOKING.CREATED_ON BETWEEN dateFrom AND dateTo&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;dateFrom and dateTo are parameters to stored procedure of dateTime type&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data &amp; Time in Records</title><link>https://community.appian.com/thread/119049?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 08:18:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e11a783a-2d82-4859-aa88-f0952b68bab2</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Would you please read my first reply! When dealing with data types, there is no such thing like a &amp;quot;format&amp;quot;. This is just a visual representation of a internal value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data &amp; Time in Records</title><link>https://community.appian.com/thread/119032?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 06:58:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:42c6c002-6e2f-479a-8e96-ab9b741990e2</guid><dc:creator>prachit0003</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Because in database dateTime is of this format&amp;nbsp;&lt;span&gt;2023-08-31 23:08:00.000059 and stored procedure is giving output when I&amp;#39;m passing this format.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But I Appian record the dateTime is of this format&amp;nbsp;9/10/2023 12:50 PM GMT+05:30.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For converting this format&amp;nbsp;9/10/2023 12:50 PM GMT+05:30 to this&amp;nbsp;2023-08-31 23:08:00.000059 I&amp;#39;m using datetext() function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To stored procedure I want to pass dateTime in&amp;nbsp;2023-08-31 23:08:00.000059 format from Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data &amp; Time in Records</title><link>https://community.appian.com/thread/119027?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 06:51:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ae405333-e0b3-4500-8170-bc77b383c91b</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;This is confusing ....&lt;/p&gt;
&lt;p&gt;You have a value of type datetime (userdatetime), then convert it into a string (datetext), just to try to convert it back into a datetime!?!?!?&lt;/p&gt;
&lt;p&gt;Why?&lt;/p&gt;
&lt;p&gt;If your stored procedure accepts a datetime vaue, why convert it into a string. And if it accepts a string, why converting it into a datetime again?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data &amp; Time in Records</title><link>https://community.appian.com/thread/119024?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 06:21:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f9263290-7106-45fa-83c0-3fbb41a672dd</guid><dc:creator>prachit0003</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now I&amp;#39;m doing this in expression rule&lt;/p&gt;
&lt;p&gt;a!localVariables(&lt;br /&gt; local!endDateTime: datetext(userdatetime(&lt;br /&gt; year: year(eomonth(now(),-1)),&lt;br /&gt; month: month(eomonth(now(),-1)),&lt;br /&gt; day: day(eomonth(now(),-1)),&lt;br /&gt; hour: 23,&lt;br /&gt; minute: 59,&lt;br /&gt; second: 59&lt;br /&gt; ),&amp;quot;yyyy-MM-dd HH:MM:SS.mmmmmm&amp;quot;),&lt;br /&gt; local!endDateTime&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff99;"&gt;OUTPUT&lt;/span&gt; :&amp;nbsp;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;2023-08-31 23:08:00.000059&amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text) , here output is text format and I want to pass dateTime format to stored procedure. But whenever using todatetime() function like&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;a!localVariables(&lt;br /&gt; local!endDateTime: todatetime(datetext(userdatetime(&lt;br /&gt; year: year(eomonth(now(),-1)),&lt;br /&gt; month: month(eomonth(now(),-1)),&lt;br /&gt; day: day(eomonth(now(),-1)),&lt;br /&gt; hour: 23,&lt;br /&gt; minute: 59,&lt;br /&gt; second: 59&lt;br /&gt; ),&amp;quot;yyyy-MM-dd HH:MM:SS.mmmmmm&amp;quot;)),&lt;br /&gt; local!endDateTime&lt;br /&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;&lt;span style="background-color:#ffff99;"&gt;OUTPUT&lt;/span&gt; :&amp;nbsp;&lt;span class="CollapsibleOutputNode---print_value"&gt;Date out of range (-2147483648)&lt;/span&gt;(Date and Time with Timezone)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ccffff;"&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;I want to convert that text (&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;2023-08-31 23:08:00.000059&amp;quot;&lt;/span&gt;(Text)) in datetime, how to do?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;Thank you.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data &amp; Time in Records</title><link>https://community.appian.com/thread/119001?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2023 19:38:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:641be5c7-30ec-4dc9-a69a-cd0525bf4a20</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Stefan is correct, but I couldn&amp;#39;t tell if the poster was also asking about the time zone. One other thing to keep in mind is that the data is&amp;nbsp;&lt;em&gt;always&lt;/em&gt; stored in the UTC time zone in the database, but when you query the results in Appian it will show it in your current time zone. I don&amp;#39;t recommend trying to offset the data - just keep it as is and Appian will automatically transform it to the correct time zone for each user.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data &amp; Time in Records</title><link>https://community.appian.com/thread/118986?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2023 17:00:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bf61df39-093f-43c8-8da2-696d278f568d</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;This is just a matter of how that value is displayed to you. The DB uses the ISO format, while Appian uses a US format. If you need to display, not transform, a date in a different format, the text() function is your friend. But do this in the UI only.&lt;/p&gt;
&lt;p&gt;And regarding your stored procedure. Either use the ISO format, or one of the date parsing function MariaDB provides.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>