CurrentDateTime
4 min
returns the local date and time of today, as a datetime value, of the current session use this function to populate a field with today's date and time this function returns the local date and local time for today as a datetime value the currentdatestr docid\ xoupklgeylzwfcak7xavq function returns midnight utc time on the server and midnight local time on the client as a text value the currentdate docid\ jbywj1rpdlcmqd icksbi function returns midnight utc time on the server and midnight local time on the client as a datetime value syntax currentdatetime() 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 yes business rules initialization rules yes business rules read only rules yes business rules required rules yes business rules validation rules yes client expressions yes object permissions yes services yes ldap yes mobile yes quick actions (except ui quick actions) yes ui quick actions yes reports yes search/dashboard without field references yes search/dashboard with field references yes parameters none 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 $(currentdatetime()) if the current date is january 15, 2014 at 4 30 pm and your time zone is pacific time (which is utc 7 during daylight savings time but utc 8 during standard time), this function returns january 16, 2014 at 12 30 am on the server and local time of january 15, 2014 at 12 30 am on the client $(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 user's current local date and time )
