FormatDateTime
4 min
date/time modifier formats take the date/time values and convert them to text in several different ways after applying a date/time format, the result is considered text syntax formatdatetime(inputdatetime, formatspecifier, customformat, timezone) enabled for for a description of the business object categories, see notes on "enabled for" docid\ u26v9fecfs6ilwa0 pvjd business object category yes/no business rules before save rules yes business rules calculation rules (after save, with or without also recalculate on load) yes1 business rules calculation rules (before save or always, without also recalculate on load) yes business rules calculation rules (before save or always, with recalculate on load) yes1 business rules editing rules yes2 business rules initialization rules yes business rules read only rules no business rules required rules yes2 business rules validation rules yes client expressions no object permissions no services no ldap no mobile no quick actions (except ui quick actions) yes ui quick actions no reports yes search/dashboard without field references no search/dashboard with field references no not fully supported in calculation rules that have a condition of after save or the also recalculate on load option selected it may fail if the rule's field is used in a grid, form, or saved search except when this field appears on a form or is triggered by such a field parameters parameter description inputdatetime the datetime you want to format formatspecifier datetime format (example shortdate, shorttime, longdate, shortdatetime, longdatetime, sortabledatetime, day, daywithleading0, dayofweekshort, dayofweeklong, monthnumber, monthname, yearshort, yearlong, hour12hour, hour12hourwithleading0, hour24hour, minute, minutewithleading0, ampm, custom) customformat (optional) flag for custom format default value is false timezone (optional) flag for returning result in base64 format default value is false return value formatted datetime value example $(formatdatetime(currentdatetime(), "shorttime", "na", "asia/kolkata")) returns this value 2 27 pm the value changes according to current time
