I need when displaying information from the database in a single cell of the grid table to display 2 dates in the format

dd.MM.yyyy-dd.MM.yyyy 

The first date is taken from one class field, the other, respectively, from another.

  • Welcome to Stack Overflow in Russian ! here it is accepted to ask one question in one question. and the second, third, and subsequent ones - to ask using the “ask a question” button in the upper right corner of the page. - aleksandr barakin February

1 answer 1

The question is very vague, but as a first approximation, the solution (except for the names and methods of the fields for dates) looks like this:

 .... dataGrid.addColumn(new TextColumn<DbType> { public String getValue(DbType dbType) { SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy"); return sdf.format(dbType.getDate1())+"-"+sdf.format(dbType.getDate2()); } } );