In oracle SQL how to get todays date in the format of lets say 01-JAN-15?

时间:2015-12-06 21:45:30

标签: sql oracle

Just want to know In oracle SQL how to get todays date in the format of lets say 01-JAN-15?

So it should return 06-DEC-15

1 个答案:

答案 0 :(得分:1)

使用to_char()。这是您将日期转换为您喜欢的任何格式的字符串的方式:

select to_char(sysdate, 'DD-MON-YY')

格式的解释是here