When defining an attribute on an entity in your domain model with type DateTime, I think it would be helpful if you can already set a standard trim functionality. When saving this attribute it is then bound by this trim funtionality.
For my client I am registering downtimes at the moment. The client is not interested in milliseconds, but only in seconds. I wanted to use [%currentdatetime%], but in order for it to work properly I need to add trimToSeconds() everywhere. I missed one spot which let to errors in the data. With this new function there is less room to make errors.
If I will use formatDate I will get a string. This is not the purpose here. I want to keep DateTime.
Please use like this formatDate([%CurrentDateTime%]) for more information please check below link : https://docs.mendix.com/refguide/parse-and-format-date-function-calls/