<?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>Change Date and Time based on user time zone</title><link>https://community.appian.com/discussions/f/general/24156/change-date-and-time-based-on-user-time-zone</link><description>Hi All, 
 I have a use case where I need to convert Date and time based on user time zone. 
 I have a date and time component, and if user of timezone CDT selects date and time as &amp;quot;4/1/2022 11:46 AM CDT&amp;quot; and submits the case. If another user of time zone</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93492?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 14:39:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:33d6a88c-7be9-4d76-8786-f4474bcd975f</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="81105" url="~/discussions/f/general/24156/change-date-and-time-based-on-user-time-zone/93159#93159"]am using a dateAndTime component and am using datatype of text to save it[/quote]
&lt;p&gt;Why are you doing it this way?&amp;nbsp; I strongly suggest you store it as a data type of date/time instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93195?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2022 15:47:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2a2d06cc-14e9-45ca-8b29-935a4bc6d7a3</guid><dc:creator>mpa17</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;Please find the snippet below,&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1649087079557v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here I have the value as &lt;strong&gt;&amp;quot;4/4/2022 10:43 AM CDT&amp;quot;&lt;/strong&gt;&amp;nbsp;which is in CDT timezone and am having it in Text datatype. I wanted this date and time to be converted based on user timezone. Now am currently in UK timezone, am expecting the value to be&amp;nbsp;&lt;strong&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;4/4/2022 4:43 PM GMT+01:00,&lt;/span&gt;&lt;/strong&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;nbsp;but my output is something else.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93194?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2022 15:35:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:21c97512-429c-4f4b-bc1e-5604b8db8f16</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Can you share the expression / interface you have created? In general the converting works pretty well between different time zones, but I&amp;#39;m wondering if there is somewhere you are explicitly saving the time zone&amp;nbsp;as&amp;nbsp;text and that&amp;#39;s why it isn&amp;#39;t converting back and forth.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93159?ContentTypeID=1</link><pubDate>Sun, 03 Apr 2022 14:29:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:58e7a61e-9b29-490b-af9f-88a61be9e712</guid><dc:creator>mpa17</dc:creator><description>&lt;p&gt;Hi Mike,&lt;/p&gt;
&lt;p&gt;For example, am using a dateAndTime component and am using datatype of text to save it. On doing so, my value will get saved as&amp;nbsp;&lt;span&gt;&lt;strong&gt;&amp;quot;4/1/2022 11:46 AM CDT&amp;quot;&lt;/strong&gt;. On retrieving it from DB, the same value will be retrieved. Is there any way to save the dateTime value in GMT format(as am using Text datatype) to DB and retrieve it, so that based on usertime zone dateTime value will be changed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Or is there any other way other than saving the value as GMT, any functions?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93158?ContentTypeID=1</link><pubDate>Sun, 03 Apr 2022 13:38:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c502568f-5c14-400c-b93a-99d7a38753ed</guid><dc:creator>shaadn0001</dc:creator><description>&lt;p&gt;I&amp;#39;m also finding this one&lt;a href="https://captionsboss.com/"&gt;.&lt;/a&gt; Is it possible to store the date in to any other timezone?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93141?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 18:14:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:75c505b8-bbe8-4bf8-bc74-91574f3abfae</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;We could use a little more detail of course - like what your data structure looks like, how exactly you&amp;#39;re capturing the datetime value and then converting it to json (and where the json is sourced from if there are any additional non-appian-input sources).&lt;/p&gt;
&lt;p&gt;But based on testing i&amp;#39;m doing right now, it looks as if a dateTime value captured into an appian dateTime entry field and then stored into JSON text, automatically converts to GMT.&amp;nbsp; If you&amp;#39;re converting it back from JSON later to a dateTime data type, it should then automatically display in a user&amp;#39;s chosen timezone, without much additional overriding necessary.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93140?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 18:03:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:063f9516-9644-4503-9dff-a089265477ca</guid><dc:creator>mpa17</dc:creator><description>&lt;p&gt;I have a&amp;nbsp;json format where I have only one column for value(which is of text datatype) to which I will be saving all the values.&lt;/p&gt;
&lt;p&gt;Is there any way to achieve this in text datatype?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93139?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 18:00:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:232759c7-4567-4da6-a8d3-83fc7ffd7b56</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;&lt;span&gt;Will saving the value as Date and tIme datatype will solve this issue?&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93138?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 17:55:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5c6cbd12-5e81-488e-992f-d0b0d23199a0</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="81105" url="~/discussions/f/general/24156/change-date-and-time-based-on-user-time-zone/93137#93137"]as text datatype[/quote]
&lt;p&gt;Ah - yeah this is the sort of thing that should&amp;#39;ve been mentioned &lt;em&gt;&lt;strong&gt;much&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;/em&gt; earlier here.&amp;nbsp; Why aren&amp;#39;t you using the DateTime type already?&amp;nbsp; This is basically exactly why we have that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93137?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 17:50:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3d234441-e8a9-43b6-a162-bb82ff100620</guid><dc:creator>mpa17</dc:creator><description>&lt;p&gt;Am just using a simple date and time component, where the value is being stored as&amp;nbsp;&lt;span&gt;&amp;quot;4/1/2022 11:46 AM CDT&amp;quot;&amp;nbsp; to DB. Here am using ri! as text datatype.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;On retrieving the saved value from DB, I wanted the value to get changed according to userTime zone.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Will saving the value as Date and tIme datatype will solve this issue?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93136?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 17:39:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6ed0b821-5e2d-4572-acdb-62f752df9d55</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Well as I said, local() is only needed as an override in specific circumstances, which are hard to enumerate without specific examples.&amp;nbsp; Could you provide some screenshots demonstrating what you&amp;#39;re currently doing and what your users are seeing, versus what you think they should be seeing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93135?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 17:38:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3813d41b-11af-4636-81ab-186f2b4f3197</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;There is no need to &amp;quot;try&amp;quot; saving as GMT - appian stores dates/times internally as GMT.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93134?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 17:37:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9a7fe435-7a54-4a67-b87c-49d0ea7bb433</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;Not sure what you mean by &amp;quot;tried saving as GMT&amp;quot;. You shouldn&amp;#39;t have to transform it before saving.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93133?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 17:37:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0030e02a-0855-441b-892f-d73243c62eb2</guid><dc:creator>mpa17</dc:creator><description>&lt;p&gt;Hi Mike,&lt;/p&gt;
&lt;p&gt;Thanks for the reply!&lt;/p&gt;
&lt;p&gt;I have tried with local(), but it is converting the time.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93132?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 17:36:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:917942b7-4b3a-4213-b5be-c62913067ce7</guid><dc:creator>mpa17</dc:creator><description>&lt;p&gt;Hi Mathieu,&lt;/p&gt;
&lt;p&gt;Thanks for the reply!&lt;/p&gt;
&lt;p&gt;Tried by saving date as GMT, but it is resulting in some other date and time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93129?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 17:06:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7fa895b4-f069-4512-b4a8-52de9b847558</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Generally speaking, Appian stores all datetimes internally as GMT, and casts them to a user&amp;#39;s timezone in most (general) display scenarios.&amp;nbsp; Thus usually you might not need to do much.&amp;nbsp; In weirder cases, I&amp;#39;ve found the funciton &amp;quot;local()&amp;quot; is one of the more helpful ones for forcing things to display in a user&amp;#39;s local time (but only when the source is something that wouldn&amp;#39;t auto-convert).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change Date and Time based on user time zone</title><link>https://community.appian.com/thread/93128?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 17:05:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9aa65b21-4e0f-4fb5-9ed7-03f7a496032e</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;Technically this should work out of the box if you are using&amp;nbsp;the&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/22.1/Date_and_Time_Component.html"&gt;https://docs.appian.com/suite/help/22.1/Date_and_Time_Component.html&lt;/a&gt;&amp;nbsp;without any manipulation.&lt;/p&gt;
&lt;p&gt;Date&amp;nbsp;should be stored as GMT in the database and is displayed according to the user&amp;#39;s preferred timezone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>