Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

If you have Year and Month (partial date) as a string in a HANA view (as given below) but need the month name in the correct sorting order, you can do the following.

YYYY_MM.png

     Created a calculated column and used the following case statement.

Case.png

Formula in text

case(rightstr("Year_and_Month",2),'01','01-Jan','02','02-Feb','3','03-Mar','04','04-Apr','05','05-May','06','06-Jun','07','07-Jul','08','08-Aug','09','09-Sep','10','10-Oct','11','11-Nov','12','12-Dec','no')

     This gives the following output...

Output.png

and it sorts in the right order too!

Sorted_Output.png

Labels in this area