Free cookie consent management tool by TermsFeed totime() Function
totime() Function


totime( value )

Converts a value to Time.

See also: time()


Keyword Type Description


Any Type

Value to convert.



Usage considerations

Using the value parameter

The value parameter accepts Integer, Decimal (double precision floating point), and Datetime, and Array data types.

Using totime() with arrays

When operating on arrays, it is not necessary to use apply with totime. If multiple parameters are passed, or one parameter is an Array, totime will return a Time Array.

Understanding results

To return a localized time for a user, the local() function must be nested within the totime() function.

For example, totime(local(pp!starttime)) returns the localized time when a given process started. Otherwise the time is returned in GMT. This is true unless the user happens to reside in the GMT timezone, then no localization is necessary.


Convert a datetime to time


Returns 12:00 PM (GMT).


Returns the user's local-time equivalent of 12:00 PM GMT.

Convert minutes to time

totime(30/1440, 60/1440, 300/1440, 1439/1440)

Returns {12:30 AM; 1:00 AM; 5:00 AM; 11:59 PM}. There are 1440 minutes in a day, so divide a number of minutes by 1440 to calculate the time.

totime(0.02083333, 0.04166667, 0.2083333, 0.9993056)

Returns {12:30 AM; 1:00 AM; 5:00 AM; 11:59 PM}.


Returns {12:00 AM; 12:00 AM; 12:00 AM; 12:00 AM} because non-zero integers cannot be converted.

totime(1, 1/1440, { null }, null)

Returns 12:00 AM, 12:01 AM, null, null.

Feature compatibility

The table below lists this function's compatibility with various features in Appian.
Feature Compatibility Note
Portals Compatible
Offline Mobile Compatible
Sync-Time Custom Record Fields Compatible

Can be used to create a custom record field that only evaluates at sync time.

Real-Time Custom Record Fields Incompatible

Custom record fields that evaluate in real time must be configured using one or more Custom Field functions.

Process Reports Compatible
Process Events Compatible
Open in Github Built: Thu, May 23, 2024 (05:09:42 PM)

totime() Function