If you need to format a date to a specific format (for this example, we will be using YYYY-MM-DD HH:mm), it can be done via an expression.
For example, you need to format the date in a datagrid, you can set the field mapping to something like this:
MapItem.YOUREFIELD != null ? new Date(MapItem.YOUREFIELD ).toISOString().split("T")[0] + " " + (new Date(MapItem.YOUREFIELD ).getHours() < 10 ? '0' : '') + new Date(MapItem.YOUREFIELD ).getHours() + ":" + (new Date(MapItem.YOUREFIELD ).getMinutes() < 10 ? '0' : '') + new Date(MapItem.YOUREFIELD ).getMinutes() : ''
Replace YOUREFIELD with the field name from which the date is coming.
The above expression will handle cases in which the field is null (first part of the logical expression), and it will then extract parts of the Date and time and format them into a specific format.
An example of the output can be seen below: