Sorting Date

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

SORT

<?xdofx:sort:substr(TRX_DATE,8,4)
decode(substr(TRX_DATE,4,3),'JAN',01,'FEB',02,'MAR',03,'APR',04,'MAY',05,'JUN',06,'J
UL',07,'AUG',08,'SEP',09,'OCT',10,'NOV',11,'DEC',12,00)
substr(TRX_DATE,1,2));'ascending';'text'?>

<?xdofx:sort:'20'||''||substr(TRX_DATE,8,4) ||''||
decode(substr(TRX_DATE,4,3),'JAN',01,'FEB',02,'MAR',03,'APR',04,'MAY',05,'JUN',06,'J
UL',07,'AUG',08,'SEP',09,'OCT',10,'NOV',11,'DEC',12,00)||''||
(substr(TRX_DATE,1,2));'ascending';'number'?>

<?xdofx: sort:'20'||substr(TRX_DATE,8,4) ||''||


decode(substr(TRX_DATE,4,3),'JAN','01','FEB','02','MAR','03','APR','04','MAY','05','JUN'
,'06','JUL','07','AUG','08','SEP','09','OCT','10','NOV','11','DEC','12','00')||''||
(substr(TRX_DATE,1,2)) ; 'ascending';'number'?>

<?xdofx: sort:'20'||substr(TRX_DATE,8,4) ||''||


decode(substr(TRX_DATE,4,3),'JAN','01','FEB','02','MAR','03','APR','04','MAY','05','JUN','06','JUL','07','AUG','08','SEP
','09','OCT','10','NOV','11','DEC','12','00')||''||(substr(TRX_DATE,1,2)) ; 'ascending';'number'?>

<?xdofx: sort:'20'||substr(TRX_DATE,8,4) ||'-'||


decode(substr(TRX_DATE,4,3),'JAN',01,'FEB',02,'MAR',03,'APR',04,'MAY','05','JUN','06'
,'JUL','07','AUG','08','SEP','09','OCT','10','NOV','11','DEC','12','00')||'-'||
(substr(TRX_DATE,1,2)) ; 'descending';'date'?>

<?sort:INVOICE_NUMBER;'descending';'number'?>

You might also like