<?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>Custom Field Date time issues</title><link>https://community.appian.com/discussions/f/user-interface/30317/custom-field-date-time-issues</link><description>I am trying to determine the shift based on datetime. Here is the use case: 
 
 Shift 1: 07:00 - 14:59:59 
 Shift 2: 15:00 - 22:59:59 
 Shift 3: 23:00 - 06:59:59 
 
 However, it’s not working as expected according to the current code that I have ( Please</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Custom Field Date time issues</title><link>https://community.appian.com/thread/120510?ContentTypeID=1</link><pubDate>Fri, 13 Oct 2023 16:20:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:000e9c61-4db6-4136-80e0-fbe033b10c78</guid><dc:creator>joseg199</dc:creator><description>&lt;p&gt;Thank you Mike for the updates. we have fixed the issue by adding a local time zone function&amp;nbsp;&lt;span&gt;&lt;span class="ui-provider fn b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak" dir="ltr"&gt;a!match(&lt;br /&gt; &amp;nbsp; value: rv!record['recordType!{942022df-8dbc-4911-b991-b4a48224c936}MECMS Case.fields.{213813ef-766f-4d3d-95c4-3d6963ed19bd}createdOn'],&lt;br /&gt; &amp;nbsp; whenTrue:and(&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;hour(local(fv!value)) &amp;gt;= 7,&lt;/strong&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; hour(local(fv!value)) &amp;lt; 15&lt;br /&gt; &amp;nbsp; ),&lt;br /&gt; &amp;nbsp; then: &amp;quot;Shift 1&amp;quot;,&lt;br /&gt; &amp;nbsp; whenTrue: and(&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; hour(local(fv!value)) &amp;gt;= 15,&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; hour(local(fv!value)) &amp;lt; 23&lt;br /&gt; &amp;nbsp; ),&lt;br /&gt; &amp;nbsp; then: &amp;quot;Shift 2&amp;quot;,&lt;br /&gt; &amp;nbsp; default: &amp;quot;Shift 3&amp;quot;,&lt;br /&gt; )&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom Field Date time issues</title><link>https://community.appian.com/thread/120509?ContentTypeID=1</link><pubDate>Fri, 13 Oct 2023 16:01:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f2474a9f-9223-47d8-98a3-a500a7516695</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Have you tried explicitly handling NULL values in your a!match() statement?&amp;nbsp; hour() breaks if passed null.&amp;nbsp; Just my first guess.&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1697212832485v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1697212936217v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;If so, the fix is pretty easy:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1697213150368v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>