惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
T
The Blog of Author Tim Ferriss
U
Unit 42
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
Vercel News
Vercel News
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
Blog — PlanetScale
Blog — PlanetScale
I
InfoQ
Y
Y Combinator Blog
F
Full Disclosure
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
博客园 - 叶小钗
S
SegmentFault 最新的问题
腾讯CDC
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理
Recent Commits to openclaw:main
Recent Commits to openclaw:main
The Register - Security
The Register - Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Azure Blog
Microsoft Azure Blog
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
F
Fortinet All Blogs
C
CXSECURITY Database RSS Feed - CXSecurity.com
Hugging Face - Blog
Hugging Face - Blog
T
Threatpost
GbyAI
GbyAI
G
GRAHAM CLULEY
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
L
LangChain Blog
T
Tenable Blog
C
Cisco Blogs
T
Threat Research - Cisco Blogs
Google Online Security Blog
Google Online Security Blog

博客园 - Leetle

win2000/xp/2003下完全卸载ORACLE Oracle9i中分区partition的使用 [ZT]Oracle数据库字符集问题解决方案大全 Oracle 8.1.6 for Win2000 系统文件解释 如何连接oracle数据库及故障解决办法 Oracle 9i初始化参数文件 简单冷备份恢复操作步骤 Win 下常用的oracle 9i服务的介绍 oracle初始化参数说明 Oracle中的数据字典技术初级入门 【转帖】揭露不为人所知的招聘网站的秘密, 业内人士告诉你:为何你的简历石沉大海?! 市场盈亏指标CYS的使用技巧 炒股短线招术(完整版) DBA常用SQL语句系列 Function怎么返回一个数据集 Oracle 9i 分析函数参考手册 使用Oracle的分析函数ROW_NUMBER、DENSE_RANK、RANK oracle日期处理完全版(二) oracle日期处理完全版(一)
oracle日期处理完全版(三)
Leetle · 2007-04-06 · via 博客园 - Leetle

15. 
找出今年的天数 
select add_months(trunc(sysdate,'year'), 12) - trunc(sysdate,'year') from dual 

闰年的处理方法 
to_char( last_day( to_date('02' || :year,'mmyyyy') ), 'dd' ) 
如果是28就不是闰年 

16. 
yyyy与rrrr的区别 
'YYYY99 TO_C 
------- ---- 
yyyy 99 0099 
rrrr 99 1999 
yyyy 01 0001 
rrrr 01 2001 

17.不同时区的处理 
select to_char( NEW_TIME( sysdate, 'GMT','EST'), 'dd/mm/yyyy hh:mi:ss') ,sysdate 
from dual; 

18. 
5秒钟一个间隔 
Select TO_DATE(FLOOR(TO_CHAR(sysdate,'SSSSS')/300) * 300,'SSSSS') ,TO_CHAR(sysdate,'SSSSS') 
from dual 

2002-11-1 9:55:00 35786 
SSSSS表示5位秒数 

19. 
一年的第几天 
select TO_CHAR(SYSDATE,'DDD'),sysdate from dual 
310 2002-11-6 10:03:51 

20.计算小时,分,秒,毫秒 
select 
Days, 
A, 
TRUNC(A*24) Hours, 
TRUNC(A*24*60 - 60*TRUNC(A*24)) Minutes, 
TRUNC(A*24*60*60 - 60*TRUNC(A*24*60)) Seconds, 
TRUNC(A*24*60*60*100 - 100*TRUNC(A*24*60*60)) mSeconds 
from 

select 
trunc(sysdate) Days, 
sysdate - trunc(sysdate) A 
from dual 

select * from tabname 
order by decode(mode,'FIFO',1,-1)*to_char(rq,'yyyymmddhh24miss'); 

// 
floor((date2-date1) /365) 作为年 
floor((date2-date1, 365) /30) 作为月 
mod(mod(date2-date1, 365), 30)作为日. 
21.next_day函数 
next_day(sysdate,6)是从当前开始下一个星期五。后面的数字是从星期日开始算起。 

Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1549016