常用的日期格式
2014-10-18 20:00
183 查看
SELECT hiredate, to_number(to_char(hiredate, 'hh24')) 时, to_number(to_char(hiredate, 'mi')) 分, to_number(to_char(hiredate, 'ss')) 秒, to_number(to_char(hiredate, 'dd')) 日, to_number(to_char(hiredate, 'mm')) 月, to_number(to_char(hiredate, 'yyyy')) 年, to_number(to_char(hiredate, 'ddd')) 年内第几天, trunc(hiredate, 'dd') 一天之始, trunc(hiredate, 'day') 周初, trunc(hiredate, 'mm') 月初, last_day(hiredate) 月未, add_months(trunc(hiredate, 'mm'),1) 下月初, trunc(hiredate, 'yy') 年初, to_char(hiredate, 'day') 周几, to_char(hiredate, 'month') 月份 FROM (SELECT hiredate + 30/24/60/60 + 20/24/60 + 5/24 AS hiredate FROM emp WHERE ROWNUM <=1);
相关文章推荐
- Sql Server 常用日期格式
- Sql Server 常用日期格式
- Sql Server 常用日期格式
- C#常用日期格式处理转换[C#日期格式转换大全](转)
- sqlserver date format(SqlServer常用日期格式)
- Sql Server 常用日期格式
- Oracle常用日期数据格式
- C#常用日期格式处理转换
- Sql Server 常用日期格式
- oracle 日期常用函數 (SYSDATE、日期格式)
- Sql Server 常用日期格式
- Sql Server 常用日期格式
- [转]Sql Server 常用日期格式及转换函数
- C#常用日期格式处理转换[C#日期格式转换大全]
- oracle 日期常用函數 (SYSDATE、日期格式)
- Sql Server 常用日期格式及转换函数
- SqlServer常用日期格式
- Sql Server 常用日期格式
- Sql Server 常用日期格式及转换函数
- .net c# 日期格式和常用处理