ToLocal
5 min
converts a datetime value to the local date and time in a time zone if you execute this function with both parameters, it returns the local date and time in the time zone that you specify if you execute this function without the timezone parameter, it returns the local date and time in the time zone associated with the current session if you execute this funtion with no parameters, it returns the current local date and time associated with the current session syntax tolocal(utcdatetime, 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) yes 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) yes business rules editing rules yes1 business rules initialization rules yes business rules read only rules no business rules required rules yes1 business rules validation rules yes client expressions no object permissions no services yes ldap yes mobile yes quick actions (except export to microsoft excel quick action and ui quick actions) yes ui quick actions no reports yes search/dashboard without field references yes search/dashboard with field references no 1 except when this field appears on a form or is triggered by such a field parameters parameter description utcdatetime (optional) a utc datetime value to convert to the local date and time the default is the current date and time timezone (optional) the time zone, in iana format return value datetime value if the application has to display the return value, it implicitly converts it to text, thereby allowing the display format to change depending on your culture code see available languages and cultures docid\ lvpbgqv5z08mcuzy43ky3 for a list of the culture codes used by example $(tolocal(currentdatetime())) the above example returns the current local date and time (the currentdatetime() function returns the current date and time in utc, and then the tolocal() function converts it to the current local date and time ) related topics javascript\ void(0);
