Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Sort report by date

Hello experts,

I have the following column in a report:

[Order date & time]

04/20/2015 10:44:03 AM

06/03/2015 05:14:03 PM

06/24/2015 04:22:10 PM

07/08/2015 09:03:08 AM

04/06/2015 06:00:39 PM

I need to display the report chronologically (day/month/yr only. time is irrelevant) using this column. The ascending/descending /custom sort options do not work.

i want to sort by day/month/yr e.g.

04062015

04202015

06032015

06242015

07082015

I did create several test variables to manipulate. All of which give # ERROR

This, works.:

variable_change date

=Substr(FormatDate([Order Date & Time];"MM/dd/yyyy") ;1 ;10)

so 04/20/2015 10:44:03 AM becomes 04/20/2015. But cant sort on this field either.

Can anyone help?

Thanks

Chuck

replied

Hi,

Right click on the object->Formatnumber->Date/Time->Custom sort and define the format like dd/MM/yyyy.


After this apply the sort.

or with your formula use this to diaply data in dd/MM/yyyy format.

=Todate(Substr(FormatDate([Order Date & Time];"MM/dd/yyyy") ;1 ;10);"dd/MM/yyyy")

Amit

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question