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.
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.
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()); } } );
Source: https://ru.stackoverflow.com/questions/489764/
All Articles