I have a timestamp column 'ts'. I need to convert it into the format:
'DD-MON-YYYY hh24:mi'.
I used this to complete the requirement:
to_char(ts, 'DD-MON-YYYY hh24:mi').
The problem is this returns a String. I am using Oracle Apex and outputting everything in a table. The table allows sorting. Now when I sort it sorts the column as a string and not as a date, so the sorting is not accurate. How can I convert a timestamp into the format I need while still being a timestamp/date field (any type as long as it accurately will sort by real dates).
YYYY-MM-DD HH24:MI, which would give you proper date sorting, even while formatted? - sstan