date format in UI Page



I'm using Bonita Community edition 7.11.0

I am building an application page with UI Designer, showing a list of cases, retrieved by the case BPM API.

The list is displayed within a TABLE widget, and contains, among other columns, the 2 case properties "start" and "end_date".

I'm trying to display those columns with a format day/month/year (eg : 11/08/2020 for august 11th 2020)

So, in the "column keys" field of the Table widget, I've entered : "start|uiDate:'dd/MM/yyyy', end_date|uiDate:'dd/MM/yyyy' " as suggested by the online help (by clicking on "Use Filters to format the data (e.g. columnKey|uiDate)")

But it doesn't work and the dates are always displayed : "2020-08-11 15:44:42.978"

I have also tried |date:'dd/MM/yyyy' or |uiDate:'short' , but the result is the same.

Thank you in advance if someone can help,


1 answer


Good afternoon!

This is translated with google, an apology if it is not understood very well!

I had a similar problem but mine was getting the date from my bdm and the problem was the format in the bdm so that it only gave me the date, I had to type date only.

So the problem lies in the type of data, in your case I think you will have to use a JavaScript to change the format of the dates. You would have to format it so that only the date comes out. (This is how it appears in my database with the date only format).


Submitted by brt6178_1422639 on Fri, 08/14/2020 - 17:05

Hello, thank you for your answer.

like you suggested, I've added a javascript variable in my Page, re-formatting the whole list of cases.

the script starts with this function:

function transformDate(zeDate){
if (zeDate) {
var zeYear= zeDate.substring(0,4);
var zeMonth= zeDate.substring(5,7);
var zeDay = zeDate.substring(8,10);
return zeDay +"/"+zeMonth+"/"+zeYear}
else {return null;}

The problem is that I assume with this script that the original case dates have always the 'yyyy/MM/dd H:mm:ss' format.

If it changes (due to Bonita installation settings ?), my function will not work anymore.



Submitted by claudia.avila_1... on Fri, 08/14/2020 - 18:27

How about, if indeed if you are looking for the dates of the original case it will always come with that format!

The truth is I could not tell you if at some point they change it, I do not believe it, but you would only have to add a condition in which you verify the input format so that your function does or does not change the format.