cancel
Showing results for 
Search instead for 
Did you mean: 

Date Column not getting sorted in a table in web Dynpro Java

Former Member
0 Kudos

Hi All,

I am facing an issue while sorting the date column in a table in my web dynpro java application.

When the date is displayed in the sql format in tha table, I am able to sort the date column successfully but when we convert the date field from sql format to util format in our table and then sort it does not work.

Kindly let us know the steps to be followed in this case to sort the date column of a table in Simple Date format as we do not want date in the sql format to be displayed.

Thanks & Regards,

Anurag

Accepted Solutions (0)

Answers (1)

Answers (1)

Qualiture
Active Contributor
0 Kudos

Hi,

That's odd, in theory you should be able to sort based on all types of objects...

By "it does not work", do you mean your table doesn't get sorted at all, or do you receive an exception?

Former Member
0 Kudos

Hi,

The sorting is working fine. The only issue is that the date format is getting changed automatically.

Does it have any dependency on the Web Browser because in IE 9.0 it is coming as DD/MM/YYYY but when accessed with IE 6.0 it is coming as MM/DD/YYYY

We do not want this kind of dependency on the browser.

Thanks & Regards,

Anurag

Qualiture
Active Contributor
0 Kudos

Hi,

You might want to check whether both your browser's language settings are identical. The browser language could also determine the date format.

As a workaround, you could add an extra attribute to your context, and set the calculated property to 'true'.

In your table, add a new column and bind to this new attribute, and hide your original date column

If you sort using the date column that's hidden now, you could use the calculated field to fixed-format your date the way you prefer (by using the SimpleDateFormatter class for instance)

Cheers,

Robin