How to format and sort a date in Oracle?

后端 未结 7 1835
长情又很酷
长情又很酷 2021-02-19 09:50

In my application am trying to format and sort the date, i am using to_char() function to format the date to my required format, but when i sort them it is sorting

7条回答
  •  被撕碎了的回忆
    2021-02-19 10:11

    You don't say what your application is written in, but in some environments (e.g. Oracle APEX, Oracle Reports) the solution is to not use to_char in the query, but then to apply the desired formatting in the tool's "column properties" or similar.

提交回复
热议问题