How to add letter “T” between date and time using Oracle?

╄→尐↘猪︶ㄣ 提交于 2021-01-23 15:11:11

问题


I want to add letter T between date and time using oracle

Like this:

2015/01/01T00:00:00

Script for date

to_char(l.date_generated, 'yyyy/mm/dd hh24:mi:ss')

回答1:


Oracle docs:

You can include these characters in a date format model: ...Character literals, enclosed in double quotation marks

so,

TO_CHAR(l.date_generated, 'yyyy/mm/dd"T"hh24:mi:ss')


来源:https://stackoverflow.com/questions/28146645/how-to-add-letter-t-between-date-and-time-using-oracle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!