Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sorting With date and time

Former Member
0 Likes
798

Hi,

i'm finding a issue with sorting of both date and time columns in descending order.

i'm having date and time .

i used code :

sort itab by date descending as text.

sort itab by time descending as text.

08-12-2008 11:23:14

08-12-2008 11:23:11

08-12-2008 11:22:10

08-12-2008 11:21:10

09-12-2008 11:23:14

09-12-2008 11:23:11

09-12-2008 11:22:10

09-12-2008 11:21:00

but i'm not getting the same format as i mentioned above. if sorting on time is made ad not date is getting sorted and viceversa.

please suggest possible changes.

thanks,

kat

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
758

you have to do this in one statement:

SORT itab BY date DESCENDING time DESCENDING.

1 REPLY 1
Read only

JozsefSzikszai
Active Contributor
0 Likes
759

you have to do this in one statement:

SORT itab BY date DESCENDING time DESCENDING.