<?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/"><channel><title>Handling Date and Time</title><link>https://community.appian.com/success/w/guide/3276/handling-date-and-time</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Handling Date and Time</title><link>https://community.appian.com/success/w/guide/3276/handling-date-and-time</link><pubDate>Tue, 23 Apr 2024 13:15:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b8d0f302-ab3e-4b8a-ad99-ddc82cedd93b</guid><dc:creator>Appian Max Team</dc:creator><comments>https://community.appian.com/success/w/guide/3276/handling-date-and-time#comments</comments><description>Current Revision posted to Guide by Appian Max Team on 4/23/2024 1:15:47 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="data_types"&gt;Data Types&lt;/h2&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/1200x1200/__key/communityserver-wikis-components-files/00-00-00-00-46/Datetime3.gif" /&gt;&lt;/div&gt;
&lt;p&gt;In Appian you can store a point in time using a variable with a &lt;strong&gt;Date and Time&lt;/strong&gt; data type, which differs from the &lt;strong&gt;Date&lt;/strong&gt; data type and the &lt;strong&gt;Time&lt;/strong&gt; data type.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;DateTime&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How is it saved in the database?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Date data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Datetimes are saved from Appian in the database in GMT.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Time data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How does it display on a SAIL form?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a date as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a dateTime and display it in the logged-in-user&amp;rsquo;s specified timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a time as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;Possible Display Formats on a SAIL form&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;January 1, 2000&lt;/p&gt;
&lt;p&gt;01/01/2000&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2017-01-01: 05:00:00&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2:00 pm&lt;/p&gt;
&lt;p&gt;14:00&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All &lt;strong&gt;Date and Time&lt;/strong&gt; values (also called &lt;strong&gt;Datetime&lt;/strong&gt; values) are stored in Greenwich Mean Time (GMT) in the database, and all Date and Time functions assume values passed to them are in GMT.&lt;/p&gt;
&lt;p&gt;If a function expects a Date and Time value, and you pass it a date, the date is automatically converted to a Date and Time value, using 12:00 am for the time component.&lt;/p&gt;
&lt;p&gt;When Datetime values are presented to users in the interface, they are &lt;em&gt;always&lt;/em&gt; adjusted to the current user&amp;#39;s time zone. This may cause the expected output to vary significantly. Additionally, the acronym of the user&amp;#39;s local time zone (such as EDT) is appended to a displayed Datetime value when it appears in a form, an alert, or in an email.&lt;/p&gt;
&lt;p&gt;See also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Data_Types.html"&gt;Data Types&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For more information on setting your time zone, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_the_Default_Language_and_Timezone.html"&gt;Configuring the Default Language and Timezone&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="common_conversions_and_casting"&gt;Common Conversions and Casting&lt;/h2&gt;
&lt;h3&gt;Converting a DateTime to a Date&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todate() around your dateTime. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can alternatively use the datetime() function to pass in individual parameters such as the year, month, day, hour, minute, second, and millisecond.&lt;/li&gt;
&lt;li&gt;Example 1: If now() returns 1/23/2017 4:00 PM EST, then todate(now()) returns 1/23/2017.&lt;/li&gt;
&lt;li&gt;Example 2: The todate() function operates on the GMT value of the given dateTime. For example, a dateTime may display as 04/01/2017 8:00 PM EST on a form, but wrapping todate() around it will return 04/02/2017 (the GMT value).&lt;/li&gt;
&lt;li&gt;Example 3: To return a localized date, use the local() function. In the above example, todate() returns the next day, however, todate(local(ri!datetime, &amp;ldquo;EST&amp;rdquo;)) would return 04/1/2017.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a Date to a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todatetime() around your date. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can use the date() function to pass in individual parameters such as year, month, and day.&lt;/li&gt;
&lt;li&gt;When converting a date to a dateTime, the time value will be 12:00 AM GMT.&lt;/li&gt;
&lt;li&gt;Example 1: todatetime(&amp;ldquo;12/13/2005&amp;rdquo;) returns 12/13/05 12:00 AM GMT.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a String to a Time or Extracting the Time from a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Use the time() function and pass in individual parameters for hour, minute, and second. To extract the time from a dateTime such as now(), type: time(hour(now()), minute(now()), second(now())).&lt;/li&gt;
&lt;li&gt;Example 1: totime(&amp;ldquo;5:50 PM&amp;rdquo;) returns 5:50 PM&lt;/li&gt;
&lt;li&gt;Example 2:totime(datetime(2014, 1, 1, 5, 59)) returns 5:59 AM.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;For the full list of Appian Functions, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Functions.html"&gt;Appian Functions&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: design patterns, Architecture&lt;/div&gt;
</description></item><item><title>Handling Date and Time</title><link>https://community.appian.com/success/w/guide/3276/handling-date-and-time/revision/9</link><pubDate>Thu, 22 Feb 2024 21:18:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b8d0f302-ab3e-4b8a-ad99-ddc82cedd93b</guid><dc:creator>Appian Max Team</dc:creator><comments>https://community.appian.com/success/w/guide/3276/handling-date-and-time#comments</comments><description>Revision 9 posted to Guide by Appian Max Team on 2/22/2024 9:18:34 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="data_types"&gt;Data Types&lt;/h2&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/1200x1200/__key/communityserver-wikis-components-files/00-00-00-00-46/Datetime3.gif" /&gt;&lt;/div&gt;
&lt;p&gt;In Appian you can store a point in time using a variable with a &lt;strong&gt;Date and Time&lt;/strong&gt; data type, which differs from the &lt;strong&gt;Date&lt;/strong&gt; data type and the &lt;strong&gt;Time&lt;/strong&gt; data type.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;DateTime&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How is it saved in the database?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Date data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Datetimes are saved from Appian in the database in GMT.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Time data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How does it display on a SAIL form?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a date as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a dateTime and display it in the logged-in-user&amp;rsquo;s specified timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a time as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;Possible Display Formats on a SAIL form&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;January 1, 2000&lt;/p&gt;
&lt;p&gt;01/01/2000&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2017-01-01: 05:00:00&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2:00 pm&lt;/p&gt;
&lt;p&gt;14:00&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All &lt;strong&gt;Date and Time&lt;/strong&gt; values (also called &lt;strong&gt;Datetime&lt;/strong&gt; values) are stored in Greenwich Mean Time (GMT) in the database, and all Date and Time functions assume values passed to them are in GMT.&lt;/p&gt;
&lt;p&gt;If a function expects a Date and Time value, and you pass it a date, the date is automatically converted to a Date and Time value, using 12:00 am for the time component.&lt;/p&gt;
&lt;p&gt;When Datetime values are presented to users in the interface, they are &lt;em&gt;always&lt;/em&gt; adjusted to the current user&amp;#39;s time zone. This may cause the expected output to vary significantly. Additionally, the acronym of the user&amp;#39;s local time zone (such as EDT) is appended to a displayed Datetime value when it appears in a form, an alert, or in an email.&lt;/p&gt;
&lt;p&gt;See also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Data_Types.html"&gt;Data Types&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For more information on setting your time zone, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_the_Default_Language_and_Timezone.html"&gt;Configuring the Default Language and Timezone&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="common_conversions_and_casting"&gt;Common Conversions and Casting&lt;/h2&gt;
&lt;h3&gt;Converting a DateTime to a Date&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todate() around your dateTime. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can alternatively use the datetime() function to pass in individual parameters such as the year, month, day, hour, minute, second, and millisecond.&lt;/li&gt;
&lt;li&gt;Example 1: If now() returns 1/23/2017 4:00 PM EST, then todate(now()) returns 1/23/2017.&lt;/li&gt;
&lt;li&gt;Example 2: The todate() function operates on the GMT value of the given dateTime. For example, a dateTime may display as 04/01/2017 8:00 PM EST on a form, but wrapping todate() around it will return 04/02/2017 (the GMT value).&lt;/li&gt;
&lt;li&gt;Example 3: To return a localized date, use the local() function. In the above example, todate() returns the next day, however, todate(local(ri!datetime, &amp;ldquo;EST&amp;rdquo;)) would return 04/1/2017.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a Date to a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todatetime() around your date. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can use the date() function to pass in individual parameters such as year, month, and day.&lt;/li&gt;
&lt;li&gt;When converting a date to a dateTime, the time value will be 12:00 AM GMT.&lt;/li&gt;
&lt;li&gt;Example 1: todatetime(&amp;ldquo;12/13/2005&amp;rdquo;) returns 12/13/05 12:00 AM GMT.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a String to a Time or Extracting the Time from a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Use the time() function and pass in individual parameters for hour, minute, and second. To extract the time from a dateTime such as now(), type: time(hour(now()), minute(now()), second(now())).&lt;/li&gt;
&lt;li&gt;Example 1: totime(&amp;ldquo;5:50 PM&amp;rdquo;) returns 5:50 PM&lt;/li&gt;
&lt;li&gt;Example 2:totime(datetime(2014, 1, 1, 5, 59)) returns 5:59 AM.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;For the full list of Appian Functions, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Functions.html"&gt;Appian Functions&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: design patterns, Architecture&lt;/div&gt;
</description></item><item><title>Handling Date and Time</title><link>https://community.appian.com/success/w/guide/3276/handling-date-and-time/revision/8</link><pubDate>Wed, 01 Nov 2023 14:47:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b8d0f302-ab3e-4b8a-ad99-ddc82cedd93b</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3276/handling-date-and-time#comments</comments><description>Revision 8 posted to Guide by matt.cosenza on 11/1/2023 2:47:56 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="data_types"&gt;Data Types&lt;/h2&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/1200x1200/__key/communityserver-wikis-components-files/00-00-00-00-46/Datetime3.gif" /&gt;&lt;/div&gt;
&lt;p&gt;In Appian you can store a point in time using a variable with a &lt;strong&gt;Date and Time&lt;/strong&gt; data type, which differs from the &lt;strong&gt;Date&lt;/strong&gt; data type and the &lt;strong&gt;Time&lt;/strong&gt; data type.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;DateTime&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How is it saved in the database?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Date data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Datetimes are saved from Appian in the database in GMT.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Time data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How does it display on a SAIL form?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a date as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a dateTime and display it in the logged-in-user&amp;rsquo;s specified timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a time as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;Possible Display Formats on a SAIL form&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;January 1, 2000&lt;/p&gt;
&lt;p&gt;01/01/2000&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2017-01-01: 05:00:00&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2:00 pm&lt;/p&gt;
&lt;p&gt;14:00&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All &lt;strong&gt;Date and Time&lt;/strong&gt; values (also called &lt;strong&gt;Datetime&lt;/strong&gt; values) are stored in Greenwich Mean Time (GMT) in the database, and all Date and Time functions assume values passed to them are in GMT.&lt;/p&gt;
&lt;p&gt;If a function expects a Date and Time value, and you pass it a date, the date is automatically converted to a Date and Time value, using 12:00 am for the time component.&lt;/p&gt;
&lt;p&gt;When Datetime values are presented to users in the interface, they are &lt;em&gt;always&lt;/em&gt; adjusted to the current user&amp;#39;s time zone. This may cause the expected output to vary significantly. Additionally, the acronym of the user&amp;#39;s local time zone (such as EDT) is appended to a displayed Datetime value when it appears in a form, an alert, or in an email.&lt;/p&gt;
&lt;p&gt;See also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Data_Types.html"&gt;Data Types&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For more information on setting your time zone, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_the_Default_Language_and_Timezone.html"&gt;Configuring the Default Language and Timezone&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="common_conversions_and_casting"&gt;Common Conversions and Casting&lt;/h2&gt;
&lt;h3&gt;Converting a DateTime to a Date&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todate() around your dateTime. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can alternatively use the datetime() function to pass in individual parameters such as the year, month, day, hour, minute, second, and millisecond.&lt;/li&gt;
&lt;li&gt;Example 1: If now() returns 1/23/2017 4:00 PM EST, then todate(now()) returns 1/23/2017.&lt;/li&gt;
&lt;li&gt;Example 2: The todate() function operates on the GMT value of the given dateTime. For example, a dateTime may display as 04/01/2017 8:00 PM EST on a form, but wrapping todate() around it will return 04/02/2017 (the GMT value).&lt;/li&gt;
&lt;li&gt;Example 3: To return a localized date, use the local() function. In the above example, todate() returns the next day, however, todate(local(ri!datetime, &amp;ldquo;EST&amp;rdquo;)) would return 04/1/2017.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a Date to a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todatetime() around your date. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can use the date() function to pass in individual parameters such as year, month, and day.&lt;/li&gt;
&lt;li&gt;When converting a date to a dateTime, the time value will be 12:00 AM GMT.&lt;/li&gt;
&lt;li&gt;Example 1: todatetime(&amp;ldquo;12/13/2005&amp;rdquo;) returns 12/13/05 12:00 AM GMT.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a String to a Time or Extracting the Time from a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Use the time() function and pass in individual parameters for hour, minute, and second. To extract the time from a dateTime such as now(), type: time(hour(now()), minute(now()), second(now())).&lt;/li&gt;
&lt;li&gt;Example 1: totime(&amp;ldquo;5:50 PM&amp;rdquo;) returns 5:50 PM&lt;/li&gt;
&lt;li&gt;Example 2:totime(datetime(2014, 1, 1, 5, 59)) returns 5:59 AM.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;For the full list of Appian Functions, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Functions.html"&gt;Appian Functions&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: design patterns, Architecture&lt;/div&gt;
</description></item><item><title>Handling Date and Time</title><link>https://community.appian.com/success/w/guide/3276/handling-date-and-time/revision/7</link><pubDate>Wed, 01 Nov 2023 14:47:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b8d0f302-ab3e-4b8a-ad99-ddc82cedd93b</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3276/handling-date-and-time#comments</comments><description>Revision 7 posted to Guide by matt.cosenza on 11/1/2023 2:47:53 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="data_types"&gt;Data Types&lt;/h2&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/1200x1200/__key/communityserver-wikis-components-files/00-00-00-00-46/Datetime3.gif" /&gt;&lt;/div&gt;
&lt;p&gt;In Appian you can store a point in time using a variable with a &lt;strong&gt;Date and Time&lt;/strong&gt; data type, which differs from the &lt;strong&gt;Date&lt;/strong&gt; data type and the &lt;strong&gt;Time&lt;/strong&gt; data type.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;DateTime&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How is it saved in the database?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Date data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Datetimes are saved from Appian in the database in GMT.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Time data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How does it display on a SAIL form?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a date as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a dateTime and display it in the logged-in-user&amp;rsquo;s specified timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a time as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;Possible Display Formats on a SAIL form&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;January 1, 2000&lt;/p&gt;
&lt;p&gt;01/01/2000&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2017-01-01: 05:00:00&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2:00 pm&lt;/p&gt;
&lt;p&gt;14:00&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All &lt;strong&gt;Date and Time&lt;/strong&gt; values (also called &lt;strong&gt;Datetime&lt;/strong&gt; values) are stored in Greenwich Mean Time (GMT) in the database, and all Date and Time functions assume values passed to them are in GMT.&lt;/p&gt;
&lt;p&gt;If a function expects a Date and Time value, and you pass it a date, the date is automatically converted to a Date and Time value, using 12:00 am for the time component.&lt;/p&gt;
&lt;p&gt;When Datetime values are presented to users in the interface, they are &lt;em&gt;always&lt;/em&gt; adjusted to the current user&amp;#39;s time zone. This may cause the expected output to vary significantly. Additionally, the acronym of the user&amp;#39;s local time zone (such as EDT) is appended to a displayed Datetime value when it appears in a form, an alert, or in an email.&lt;/p&gt;
&lt;p&gt;See also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Data_Types.html"&gt;Data Types&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For more information on setting your time zone, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_the_Default_Language_and_Timezone.html"&gt;Configuring the Default Language and Timezone&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="common_conversions_and_casting"&gt;Common Conversions and Casting&lt;/h2&gt;
&lt;h3&gt;Converting a DateTime to a Date&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todate() around your dateTime. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can alternatively use the datetime() function to pass in individual parameters such as the year, month, day, hour, minute, second, and millisecond.&lt;/li&gt;
&lt;li&gt;Example 1: If now() returns 1/23/2017 4:00 PM EST, then todate(now()) returns 1/23/2017.&lt;/li&gt;
&lt;li&gt;Example 2: The todate() function operates on the GMT value of the given dateTime. For example, a dateTime may display as 04/01/2017 8:00 PM EST on a form, but wrapping todate() around it will return 04/02/2017 (the GMT value).&lt;/li&gt;
&lt;li&gt;Example 3: To return a localized date, use the local() function. In the above example, todate() returns the next day, however, todate(local(ri!datetime, &amp;ldquo;EST&amp;rdquo;)) would return 04/1/2017.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a Date to a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todatetime() around your date. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can use the date() function to pass in individual parameters such as year, month, and day.&lt;/li&gt;
&lt;li&gt;When converting a date to a dateTime, the time value will be 12:00 AM GMT.&lt;/li&gt;
&lt;li&gt;Example 1: todatetime(&amp;ldquo;12/13/2005&amp;rdquo;) returns 12/13/05 12:00 AM GMT.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a String to a Time or Extracting the Time from a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Use the time() function and pass in individual parameters for hour, minute, and second. To extract the time from a dateTime such as now(), type: time(hour(now()), minute(now()), second(now())).&lt;/li&gt;
&lt;li&gt;Example 1: totime(&amp;ldquo;5:50 PM&amp;rdquo;) returns 5:50 PM&lt;/li&gt;
&lt;li&gt;Example 2:totime(datetime(2014, 1, 1, 5, 59)) returns 5:59 AM.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;For the full list of Appian Functions, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Functions.html"&gt;Appian Functions&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Handling Date and Time</title><link>https://community.appian.com/success/w/guide/3276/handling-date-and-time/revision/6</link><pubDate>Wed, 18 Oct 2023 18:50:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b8d0f302-ab3e-4b8a-ad99-ddc82cedd93b</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3276/handling-date-and-time#comments</comments><description>Revision 6 posted to Guide by matt.cosenza on 10/18/2023 6:50:09 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="date_datetime_time_data_types"&gt;Date DateTime Time Data Types&lt;/h2&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/1200x1200/__key/communityserver-wikis-components-files/00-00-00-00-46/Datetime3.gif" /&gt;&lt;/div&gt;
&lt;p&gt;In Appian you can store a point in time using a variable with a &lt;strong&gt;Date and Time&lt;/strong&gt; data type, which differs from the &lt;strong&gt;Date&lt;/strong&gt; data type and the &lt;strong&gt;Time&lt;/strong&gt; data type.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;DateTime&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How is it saved in the database?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Date data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Datetimes are saved from Appian in the database in GMT.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Time data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How does it display on a SAIL form?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a date as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a dateTime and display it in the logged-in-user&amp;rsquo;s specified timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a time as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;Possible Display Formats on a SAIL form&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;January 1, 2000&lt;/p&gt;
&lt;p&gt;01/01/2000&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2017-01-01: 05:00:00&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2:00 pm&lt;/p&gt;
&lt;p&gt;14:00&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All &lt;strong&gt;Date and Time&lt;/strong&gt; values (also called &lt;strong&gt;Datetime&lt;/strong&gt; values) are stored in Greenwich Mean Time (GMT) in the database, and all Date and Time functions assume values passed to them are in GMT.&lt;/p&gt;
&lt;p&gt;If a function expects a Date and Time value, and you pass it a date, the date is automatically converted to a Date and Time value, using 12:00 am for the time component.&lt;/p&gt;
&lt;p&gt;When Datetime values are presented to users in the interface, they are &lt;em&gt;always&lt;/em&gt; adjusted to the current user&amp;#39;s time zone. This may cause the expected output to vary significantly. Additionally, the acronym of the user&amp;#39;s local time zone (such as EDT) is appended to a displayed Datetime value when it appears in a form, an alert, or in an email.&lt;/p&gt;
&lt;p&gt;See also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Data_Types.html"&gt;Data Types&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For more information on setting your time zone, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_the_Default_Language_and_Timezone.html"&gt;Configuring the Default Language and Timezone&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="common_conversions_and_casting"&gt;Common Conversions and Casting&lt;/h2&gt;
&lt;h3&gt;Converting a DateTime to a Date&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todate() around your dateTime. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can alternatively use the datetime() function to pass in individual parameters such as the year, month, day, hour, minute, second, and millisecond.&lt;/li&gt;
&lt;li&gt;Example 1: If now() returns 1/23/2017 4:00 PM EST, then todate(now()) returns 1/23/2017.&lt;/li&gt;
&lt;li&gt;Example 2: The todate() function operates on the GMT value of the given dateTime. For example, a dateTime may display as 04/01/2017 8:00 PM EST on a form, but wrapping todate() around it will return 04/02/2017 (the GMT value).&lt;/li&gt;
&lt;li&gt;Example 3: To return a localized date, use the local() function. In the above example, todate() returns the next day, however, todate(local(ri!datetime, &amp;ldquo;EST&amp;rdquo;)) would return 04/1/2017.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a Date to a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todatetime() around your date. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can use the date() function to pass in individual parameters such as year, month, and day.&lt;/li&gt;
&lt;li&gt;When converting a date to a dateTime, the time value will be 12:00 AM GMT.&lt;/li&gt;
&lt;li&gt;Example 1: todatetime(&amp;ldquo;12/13/2005&amp;rdquo;) returns 12/13/05 12:00 AM GMT.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a String to a Time or Extracting the Time from a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Use the time() function and pass in individual parameters for hour, minute, and second. To extract the time from a dateTime such as now(), type: time(hour(now()), minute(now()), second(now())).&lt;/li&gt;
&lt;li&gt;Example 1: totime(&amp;ldquo;5:50 PM&amp;rdquo;) returns 5:50 PM&lt;/li&gt;
&lt;li&gt;Example 2:totime(datetime(2014, 1, 1, 5, 59)) returns 5:59 AM.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;For the full list of Appian Functions, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Functions.html"&gt;Appian Functions&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Handling Date and Time</title><link>https://community.appian.com/success/w/guide/3276/handling-date-and-time/revision/5</link><pubDate>Wed, 18 Oct 2023 18:49:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b8d0f302-ab3e-4b8a-ad99-ddc82cedd93b</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3276/handling-date-and-time#comments</comments><description>Revision 5 posted to Guide by matt.cosenza on 10/18/2023 6:49:39 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="date-datetime-time_data_types"&gt;Date-DateTime-Time Data Types&lt;/h2&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/1200x1200/__key/communityserver-wikis-components-files/00-00-00-00-46/Datetime3.gif" /&gt;&lt;/div&gt;
&lt;p&gt;In Appian you can store a point in time using a variable with a &lt;strong&gt;Date and Time&lt;/strong&gt; data type, which differs from the &lt;strong&gt;Date&lt;/strong&gt; data type and the &lt;strong&gt;Time&lt;/strong&gt; data type.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;DateTime&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How is it saved in the database?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Date data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Datetimes are saved from Appian in the database in GMT.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Time data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How does it display on a SAIL form?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a date as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a dateTime and display it in the logged-in-user&amp;rsquo;s specified timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a time as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;Possible Display Formats on a SAIL form&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;January 1, 2000&lt;/p&gt;
&lt;p&gt;01/01/2000&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2017-01-01: 05:00:00&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2:00 pm&lt;/p&gt;
&lt;p&gt;14:00&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All &lt;strong&gt;Date and Time&lt;/strong&gt; values (also called &lt;strong&gt;Datetime&lt;/strong&gt; values) are stored in Greenwich Mean Time (GMT) in the database, and all Date and Time functions assume values passed to them are in GMT.&lt;/p&gt;
&lt;p&gt;If a function expects a Date and Time value, and you pass it a date, the date is automatically converted to a Date and Time value, using 12:00 am for the time component.&lt;/p&gt;
&lt;p&gt;When Datetime values are presented to users in the interface, they are &lt;em&gt;always&lt;/em&gt; adjusted to the current user&amp;#39;s time zone. This may cause the expected output to vary significantly. Additionally, the acronym of the user&amp;#39;s local time zone (such as EDT) is appended to a displayed Datetime value when it appears in a form, an alert, or in an email.&lt;/p&gt;
&lt;p&gt;See also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Data_Types.html"&gt;Data Types&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For more information on setting your time zone, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_the_Default_Language_and_Timezone.html"&gt;Configuring the Default Language and Timezone&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="common_conversions_and_casting"&gt;Common Conversions and Casting&lt;/h2&gt;
&lt;h3&gt;Converting a DateTime to a Date&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todate() around your dateTime. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can alternatively use the datetime() function to pass in individual parameters such as the year, month, day, hour, minute, second, and millisecond.&lt;/li&gt;
&lt;li&gt;Example 1: If now() returns 1/23/2017 4:00 PM EST, then todate(now()) returns 1/23/2017.&lt;/li&gt;
&lt;li&gt;Example 2: The todate() function operates on the GMT value of the given dateTime. For example, a dateTime may display as 04/01/2017 8:00 PM EST on a form, but wrapping todate() around it will return 04/02/2017 (the GMT value).&lt;/li&gt;
&lt;li&gt;Example 3: To return a localized date, use the local() function. In the above example, todate() returns the next day, however, todate(local(ri!datetime, &amp;ldquo;EST&amp;rdquo;)) would return 04/1/2017.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a Date to a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todatetime() around your date. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can use the date() function to pass in individual parameters such as year, month, and day.&lt;/li&gt;
&lt;li&gt;When converting a date to a dateTime, the time value will be 12:00 AM GMT.&lt;/li&gt;
&lt;li&gt;Example 1: todatetime(&amp;ldquo;12/13/2005&amp;rdquo;) returns 12/13/05 12:00 AM GMT.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a String to a Time or Extracting the Time from a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Use the time() function and pass in individual parameters for hour, minute, and second. To extract the time from a dateTime such as now(), type: time(hour(now()), minute(now()), second(now())).&lt;/li&gt;
&lt;li&gt;Example 1: totime(&amp;ldquo;5:50 PM&amp;rdquo;) returns 5:50 PM&lt;/li&gt;
&lt;li&gt;Example 2:totime(datetime(2014, 1, 1, 5, 59)) returns 5:59 AM.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;For the full list of Appian Functions, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Functions.html"&gt;Appian Functions&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Handling Date and Time</title><link>https://community.appian.com/success/w/guide/3276/handling-date-and-time/revision/4</link><pubDate>Wed, 18 Oct 2023 18:48:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b8d0f302-ab3e-4b8a-ad99-ddc82cedd93b</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3276/handling-date-and-time#comments</comments><description>Revision 4 posted to Guide by matt.cosenza on 10/18/2023 6:48:58 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="date,_datetime,_and_time_data_types"&gt;Date, DateTime, and Time Data Types&lt;/h2&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/1200x1200/__key/communityserver-wikis-components-files/00-00-00-00-46/Datetime3.gif" /&gt;&lt;/div&gt;
&lt;p&gt;In Appian you can store a point in time using a variable with a &lt;strong&gt;Date and Time&lt;/strong&gt; data type, which differs from the &lt;strong&gt;Date&lt;/strong&gt; data type and the &lt;strong&gt;Time&lt;/strong&gt; data type.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;DateTime&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How is it saved in the database?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Date data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Datetimes are saved from Appian in the database in GMT.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Time data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How does it display on a SAIL form?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a date as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a dateTime and display it in the logged-in-user&amp;rsquo;s specified timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a time as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;Possible Display Formats on a SAIL form&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;January 1, 2000&lt;/p&gt;
&lt;p&gt;01/01/2000&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2017-01-01: 05:00:00&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2:00 pm&lt;/p&gt;
&lt;p&gt;14:00&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All &lt;strong&gt;Date and Time&lt;/strong&gt; values (also called &lt;strong&gt;Datetime&lt;/strong&gt; values) are stored in Greenwich Mean Time (GMT) in the database, and all Date and Time functions assume values passed to them are in GMT.&lt;/p&gt;
&lt;p&gt;If a function expects a Date and Time value, and you pass it a date, the date is automatically converted to a Date and Time value, using 12:00 am for the time component.&lt;/p&gt;
&lt;p&gt;When Datetime values are presented to users in the interface, they are &lt;em&gt;always&lt;/em&gt; adjusted to the current user&amp;#39;s time zone. This may cause the expected output to vary significantly. Additionally, the acronym of the user&amp;#39;s local time zone (such as EDT) is appended to a displayed Datetime value when it appears in a form, an alert, or in an email.&lt;/p&gt;
&lt;p&gt;See also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Data_Types.html"&gt;Data Types&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For more information on setting your time zone, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_the_Default_Language_and_Timezone.html"&gt;Configuring the Default Language and Timezone&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="common_conversions_and_casting"&gt;Common Conversions and Casting&lt;/h2&gt;
&lt;h3&gt;Converting a DateTime to a Date&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todate() around your dateTime. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can alternatively use the datetime() function to pass in individual parameters such as the year, month, day, hour, minute, second, and millisecond.&lt;/li&gt;
&lt;li&gt;Example 1: If now() returns 1/23/2017 4:00 PM EST, then todate(now()) returns 1/23/2017.&lt;/li&gt;
&lt;li&gt;Example 2: The todate() function operates on the GMT value of the given dateTime. For example, a dateTime may display as 04/01/2017 8:00 PM EST on a form, but wrapping todate() around it will return 04/02/2017 (the GMT value).&lt;/li&gt;
&lt;li&gt;Example 3: To return a localized date, use the local() function. In the above example, todate() returns the next day, however, todate(local(ri!datetime, &amp;ldquo;EST&amp;rdquo;)) would return 04/1/2017.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a Date to a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todatetime() around your date. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can use the date() function to pass in individual parameters such as year, month, and day.&lt;/li&gt;
&lt;li&gt;When converting a date to a dateTime, the time value will be 12:00 AM GMT.&lt;/li&gt;
&lt;li&gt;Example 1: todatetime(&amp;ldquo;12/13/2005&amp;rdquo;) returns 12/13/05 12:00 AM GMT.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a String to a Time or Extracting the Time from a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Use the time() function and pass in individual parameters for hour, minute, and second. To extract the time from a dateTime such as now(), type: time(hour(now()), minute(now()), second(now())).&lt;/li&gt;
&lt;li&gt;Example 1: totime(&amp;ldquo;5:50 PM&amp;rdquo;) returns 5:50 PM&lt;/li&gt;
&lt;li&gt;Example 2:totime(datetime(2014, 1, 1, 5, 59)) returns 5:59 AM.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;For the full list of Appian Functions, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Functions.html"&gt;Appian Functions&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Handling Date and Time</title><link>https://community.appian.com/success/w/guide/3276/handling-date-and-time/revision/3</link><pubDate>Wed, 18 Oct 2023 18:47:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b8d0f302-ab3e-4b8a-ad99-ddc82cedd93b</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3276/handling-date-and-time#comments</comments><description>Revision 3 posted to Guide by matt.cosenza on 10/18/2023 6:47:52 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;h2 id="data_types"&gt;Data Types&lt;/h2&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/1200x1200/__key/communityserver-wikis-components-files/00-00-00-00-46/Datetime3.gif" /&gt;&lt;/div&gt;
&lt;p&gt;In Appian you can store a point in time using a variable with a &lt;strong&gt;Date and Time&lt;/strong&gt; data type, which differs from the &lt;strong&gt;Date&lt;/strong&gt; data type and the &lt;strong&gt;Time&lt;/strong&gt; data type.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;DateTime&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How is it saved in the database?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Date data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Datetimes are saved from Appian in the database in GMT.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Time data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How does it display on a SAIL form?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a date as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a dateTime and display it in the logged-in-user&amp;rsquo;s specified timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a time as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;Possible Display Formats on a SAIL form&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;January 1, 2000&lt;/p&gt;
&lt;p&gt;01/01/2000&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2017-01-01: 05:00:00&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2:00 pm&lt;/p&gt;
&lt;p&gt;14:00&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All &lt;strong&gt;Date and Time&lt;/strong&gt; values (also called &lt;strong&gt;Datetime&lt;/strong&gt; values) are stored in Greenwich Mean Time (GMT) in the database, and all Date and Time functions assume values passed to them are in GMT.&lt;/p&gt;
&lt;p&gt;If a function expects a Date and Time value, and you pass it a date, the date is automatically converted to a Date and Time value, using 12:00 am for the time component.&lt;/p&gt;
&lt;p&gt;When Datetime values are presented to users in the interface, they are &lt;em&gt;always&lt;/em&gt; adjusted to the current user&amp;#39;s time zone. This may cause the expected output to vary significantly. Additionally, the acronym of the user&amp;#39;s local time zone (such as EDT) is appended to a displayed Datetime value when it appears in a form, an alert, or in an email.&lt;/p&gt;
&lt;p&gt;See also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Data_Types.html"&gt;Data Types&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For more information on setting your time zone, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_the_Default_Language_and_Timezone.html"&gt;Configuring the Default Language and Timezone&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="common_conversions_and_casting"&gt;Common Conversions and Casting&lt;/h2&gt;
&lt;h3&gt;Converting a DateTime to a Date&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todate() around your dateTime. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can alternatively use the datetime() function to pass in individual parameters such as the year, month, day, hour, minute, second, and millisecond.&lt;/li&gt;
&lt;li&gt;Example 1: If now() returns 1/23/2017 4:00 PM EST, then todate(now()) returns 1/23/2017.&lt;/li&gt;
&lt;li&gt;Example 2: The todate() function operates on the GMT value of the given dateTime. For example, a dateTime may display as 04/01/2017 8:00 PM EST on a form, but wrapping todate() around it will return 04/02/2017 (the GMT value).&lt;/li&gt;
&lt;li&gt;Example 3: To return a localized date, use the local() function. In the above example, todate() returns the next day, however, todate(local(ri!datetime, &amp;ldquo;EST&amp;rdquo;)) would return 04/1/2017.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a Date to a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todatetime() around your date. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can use the date() function to pass in individual parameters such as year, month, and day.&lt;/li&gt;
&lt;li&gt;When converting a date to a dateTime, the time value will be 12:00 AM GMT.&lt;/li&gt;
&lt;li&gt;Example 1: todatetime(&amp;ldquo;12/13/2005&amp;rdquo;) returns 12/13/05 12:00 AM GMT.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a String to a Time or Extracting the Time from a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Use the time() function and pass in individual parameters for hour, minute, and second. To extract the time from a dateTime such as now(), type: time(hour(now()), minute(now()), second(now())).&lt;/li&gt;
&lt;li&gt;Example 1: totime(&amp;ldquo;5:50 PM&amp;rdquo;) returns 5:50 PM&lt;/li&gt;
&lt;li&gt;Example 2:totime(datetime(2014, 1, 1, 5, 59)) returns 5:59 AM.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;For the full list of Appian Functions, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Functions.html"&gt;Appian Functions&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Handling Date and Time</title><link>https://community.appian.com/success/w/guide/3276/handling-date-and-time/revision/2</link><pubDate>Wed, 18 Oct 2023 18:44:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b8d0f302-ab3e-4b8a-ad99-ddc82cedd93b</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3276/handling-date-and-time#comments</comments><description>Revision 2 posted to Guide by matt.cosenza on 10/18/2023 6:44:49 PM&lt;br /&gt;
&lt;div&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/1200x1200/__key/communityserver-wikis-components-files/00-00-00-00-46/Datetime3.gif" /&gt;&lt;/div&gt;
&lt;p&gt;In Appian you can store a point in time using a variable with a &lt;strong&gt;Date and Time&lt;/strong&gt; data type, which differs from the &lt;strong&gt;Date&lt;/strong&gt; data type and the &lt;strong&gt;Time&lt;/strong&gt; data type.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;DateTime&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How is it saved in the database?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Date data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Datetimes are saved from Appian in the database in GMT.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Time data is stored as entered without conversion to a time zone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;How does it display on a SAIL form?&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a date as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a dateTime and display it in the logged-in-user&amp;rsquo;s specified timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Appian will read a time as it is stored in the database without any conversion based on timezone.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;Possible Display Formats on a SAIL form&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;January 1, 2000&lt;/p&gt;
&lt;p&gt;01/01/2000&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2017-01-01: 05:00:00&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2:00 pm&lt;/p&gt;
&lt;p&gt;14:00&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All &lt;strong&gt;Date and Time&lt;/strong&gt; values (also called &lt;strong&gt;Datetime&lt;/strong&gt; values) are stored in Greenwich Mean Time (GMT) in the database, and all Date and Time functions assume values passed to them are in GMT.&lt;/p&gt;
&lt;p&gt;If a function expects a Date and Time value, and you pass it a date, the date is automatically converted to a Date and Time value, using 12:00 am for the time component.&lt;/p&gt;
&lt;p&gt;When Datetime values are presented to users in the interface, they are &lt;em&gt;always&lt;/em&gt; adjusted to the current user&amp;#39;s time zone. This may cause the expected output to vary significantly. Additionally, the acronym of the user&amp;#39;s local time zone (such as EDT) is appended to a displayed Datetime value when it appears in a form, an alert, or in an email.&lt;/p&gt;
&lt;p&gt;See also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Data_Types.html"&gt;Data Types&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For more information on setting your time zone, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_the_Default_Language_and_Timezone.html"&gt;Configuring the Default Language and Timezone&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Common Conversions/Casting&lt;/strong&gt;&lt;/h3&gt;
&lt;h3&gt;Converting a DateTime to a Date&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todate() around your dateTime. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can alternatively use the datetime() function to pass in individual parameters such as the year, month, day, hour, minute, second, and millisecond.&lt;/li&gt;
&lt;li&gt;Example 1: If now() returns 1/23/2017 4:00 PM EST, then todate(now()) returns 1/23/2017.&lt;/li&gt;
&lt;li&gt;Example 2: The todate() function operates on the GMT value of the given dateTime. For example, a dateTime may display as 04/01/2017 8:00 PM EST on a form, but wrapping todate() around it will return 04/02/2017 (the GMT value).&lt;/li&gt;
&lt;li&gt;Example 3: To return a localized date, use the local() function. In the above example, todate() returns the next day, however, todate(local(ri!datetime, &amp;ldquo;EST&amp;rdquo;)) would return 04/1/2017.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a Date to a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Wrap todatetime() around your date. This function will accept both numerical and text values. If you are unable to successfully cast to a dateTime using this function, you can use the date() function to pass in individual parameters such as year, month, and day.&lt;/li&gt;
&lt;li&gt;When converting a date to a dateTime, the time value will be 12:00 AM GMT.&lt;/li&gt;
&lt;li&gt;Example 1: todatetime(&amp;ldquo;12/13/2005&amp;rdquo;) returns 12/13/05 12:00 AM GMT.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Converting a String to a Time or Extracting the Time from a DateTime&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Use the time() function and pass in individual parameters for hour, minute, and second. To extract the time from a dateTime such as now(), type: time(hour(now()), minute(now()), second(now())).&lt;/li&gt;
&lt;li&gt;Example 1: totime(&amp;ldquo;5:50 PM&amp;rdquo;) returns 5:50 PM&lt;/li&gt;
&lt;li&gt;Example 2:totime(datetime(2014, 1, 1, 5, 59)) returns 5:59 AM.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;For the full list of Appian Functions, see also: &lt;a href="https://docs.appian.com/suite/help/latest/Appian_Functions.html"&gt;Appian Functions&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Handling Date and Time</title><link>https://community.appian.com/success/w/guide/3276/handling-date-and-time/revision/1</link><pubDate>Wed, 06 Sep 2023 14:20:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b8d0f302-ab3e-4b8a-ad99-ddc82cedd93b</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/guide/3276/handling-date-and-time#comments</comments><description>Revision 1 posted to Guide by joel.larin on 9/6/2023 2:20:50 PM&lt;br /&gt;
&lt;p&gt;fsdf&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>