DateRenderer with leading Zeros


i am trying to use the DateRenderer in Grid.
For now i use

new DateRenderer("%1$2te.%1$2tm.%1$tY", Locale.GERMAN)) It should a white spaces in front which it does if i do something like this:

Date d = new Date(162255555); System.out.println(String.format(Locale.getDefault(), "%1$2te.%1$tm.%1$tY", d)); But the Whitespaces got removed in grid and anyway i need leading zeros.
Someone have any idea how to do that?

Thanks for any help.

Hi Michael,

It seems to be a classic Browser/HTML feature that is by default removing excess whitespaces. You should apply a custom stylename to all cells in that specific column and provide a CSS rule
white-space: pre;
to it.


Thank your for the idea,
i tried it, but it did not fix it.
It adds a white-space to some of the rows, but does not line up all.
Further more i would like to have a leading zero, should be possible with the mighty Java Date, but i don’t get it :slight_smile: