自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Oracle數(shù)據(jù)庫(kù)中常用時(shí)間的正確處理方案

數(shù)據(jù)庫(kù) Oracle
我們今天主要描述的是Oracle數(shù)據(jù)庫(kù)中常用時(shí)間的正確處理方案,如果你對(duì)這一新開發(fā)的技術(shù),心存好奇的話,以下的文章將會(huì)揭開它的神秘面紗。

以下的文章主要Oracle數(shù)據(jù)庫(kù)中常用時(shí)間的處理,Oracle數(shù)據(jù)庫(kù)中常用時(shí)間的處理是在實(shí)際應(yīng)用中經(jīng)常出現(xiàn),以下的文章就是對(duì)其實(shí)際問題的解決,以下就是具體方案的描述,希望在你今后的學(xué)習(xí)中會(huì)有所幫助。

4824小時(shí)的形式顯示出來(lái)要用HH24

 

  1. select to_char(sysdate,'yyyy-MM-dd HH24:mi:ss') from dual;  
  2. select to_date('2005-01-01 13:14:20','yyyy-MM-dd HH24:mi:ss') from dual;  
  3. to_date() function  

 

1.日期格式參數(shù) 含義說(shuō)明

D 一周中的星期幾

DAY 天的名字,使用空格填充到9個(gè)字符

DD 月中的第幾天

DDD 年中的第幾天

DY 天的簡(jiǎn)寫名

IW ISO標(biāo)準(zhǔn)的年中的第幾周

IYYY ISO標(biāo)準(zhǔn)的四位年份

YYYY 四位年份

YYY,YY,Y 年份的***三位,兩位,一位

HH 小時(shí),按12小時(shí)計(jì)

HH24 小時(shí),按24小時(shí)計(jì)

MI 分

SS 秒

MM 月

Mon 月份的簡(jiǎn)寫

Month 月份的全名

W 該月的第幾個(gè)星期

WW 年中的第幾個(gè)星期 1.日期時(shí)間間隔操作

Oracle數(shù)據(jù)庫(kù)中時(shí)間處理:當(dāng)前時(shí)間減去7分鐘的時(shí)間

 

  1. select sysdate,sysdate - interval '7' MINUTE from dual 

當(dāng)前時(shí)間減去7小時(shí)的時(shí)間

 

  1. select sysdate - interval '7' hour from dual 

當(dāng)前時(shí)間減去7天的時(shí)間

 

  1. select sysdate - interval '7' day from dual 

當(dāng)前時(shí)間減去7月的時(shí)間

 

  1. select sysdate,sysdate - interval '7' month from dual 

當(dāng)前時(shí)間減去7年的時(shí)間

 

  1. select sysdate,sysdate - interval '7' year from dual 

時(shí)間間隔乘以一個(gè)數(shù)字

 

  1. select sysdate,sysdate - 8 *interval '2' hour from dual 

2.日期到字符操作

 

  1. select sysdate,to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual  
  2. select sysdate,to_char(sysdate,'yyyy-mm-dd hh:mi:ss') from dual  
  3. select sysdate,to_char(sysdate,'yyyy-ddd hh:mi:ss') from dual  
  4. select sysdate,to_char(sysdate,'yyyy-mm iw-d hh:mi:ss') from dual  

 

參考o(jì)racle數(shù)據(jù)庫(kù)的相關(guān)關(guān)文檔(ORACLE901DOC/SERVER.901/A90125/SQL_ELEMENTS4.HTM#48515)

3. 字符到日期操作

 

  1. select to_date('2003-10-17 21:15:37','yyyy-mm-dd hh24:mi:ss') from dual 

具體用法和上面的to_char差不多。以上的相關(guān)內(nèi)容就是對(duì)Oracle數(shù)據(jù)庫(kù)中時(shí)間處理的介紹,望你能有所收獲。

【編輯推薦】

  1. Oracle移植到MySQL會(huì)碰到那些問題?
  2. Oracle字符集的查看與修改全集
  3. Oracle建立DBLINK的操作經(jīng)驗(yàn)總結(jié)
  4. Oracle Nvl函數(shù)的實(shí)際應(yīng)用有哪些?
  5. Oracle Datafiles管理需要哪些項(xiàng)目?

 

責(zé)任編輯:佚名 來(lái)源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-04-06 16:50:07

Oracle數(shù)據(jù)庫(kù)

2011-05-26 14:31:57

Oracle數(shù)據(jù)庫(kù)

2010-09-30 10:31:28

2011-05-26 13:36:40

Oracle數(shù)據(jù)庫(kù)時(shí)間處理

2009-12-07 15:50:27

WCF文件

2010-04-14 15:58:17

Oracle程序開發(fā)

2021-12-31 18:20:44

數(shù)據(jù)云端數(shù)據(jù)遷移

2009-12-02 09:49:43

PHP Ajax亂碼

2011-05-26 14:43:49

ORACLE數(shù)據(jù)庫(kù)異常處理

2011-08-10 16:01:11

OracleConstraint

2010-05-21 11:07:55

MySQL 5 亂碼問

2021-01-06 08:14:21

時(shí)間序列數(shù)據(jù)庫(kù)數(shù)據(jù)庫(kù)

2010-05-05 10:19:19

Oracle數(shù)據(jù)導(dǎo)

2010-04-29 11:53:42

Oracle數(shù)據(jù)庫(kù)

2010-04-30 14:39:03

Oracle數(shù)據(jù)庫(kù)

2010-05-31 09:50:13

MySQL數(shù)據(jù)庫(kù)

2010-05-21 16:33:02

MySQL數(shù)據(jù)庫(kù)

2010-04-19 13:56:19

Oracle數(shù)據(jù)庫(kù)服務(wù)

2010-04-26 18:32:48

Oracle數(shù)據(jù)庫(kù)

2010-04-06 11:02:30

Oracle 數(shù)據(jù)庫(kù)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)