Skip to Content
avatar image
Former Member

months (jan,feb,mar..)not getting sorted in a timestamp

Hi All,

I am facing a problem in how sorting a date in the format of "dd-MMM-yy HH.mm.ss" where MMM = jan,feb,mar....dec.

The problem is the numeric part of the date is getting sorted whereas the month is not getting sorted like 13 - June 10 should come after 21 - Jan 10 when sorted in descending order

The requirement is strictly in this format that's why cannot keep it as dd-MM-yy(MM as numeric) which gets sorted easily.

(I am using NWDS CE7.1 with JDK 1.5.0_06)

Request you to help me in getting a solution on this.

Thank You.

Regards,

Reinuka.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 17, 2010 at 01:52 AM

    Hi Reinuka,

    I am facing a problem in how sorting a date in the format of "dd-MMM-yy HH.mm.ss"--You can sort this kind of date format too. Convert this date format into Date type and then sort.

    Please refer the below thread, having solution for same question:-

    Problem in sorting with date

    Hope this may help you.

    Deepak!!!

    Add comment
    10|10000 characters needed characters exceeded