Trouble with date substraction in Oracle

前端 未结 1 524
夕颜
夕颜 2021-01-23 13:09

i have some trouble doing dates substractions on Oracle database.

I have a query:

select 
status,
id, 
to_char(creationdatetime,\'yyyy/mm/dd hh24:mm:ss\'         


        
相关标签:
1条回答
  • 2021-01-23 13:52

    You are displaying the dates with an incorrect format.

    mm is the month, not minutes. So you are repeating the month in the time display.

    You want: 'yyyy/mm/dd hh24:mi:ss' (note the mi in the format mask)

    0 讨论(0)
提交回复
热议问题