欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

DB2時間函數(shù)大全

系統(tǒng) 3134 0
      
        
          原文出處:http://database.51cto.com/art/201011/232578.htm
        
        

1
-- 獲取當(dāng)前日期: 2 3 select current date from sysibm.sysdummy1; 4 values current date; 5 6 -- 獲取當(dāng)前日期 7 select current time from sysibm.sysdummy1; 8 values current time; 9 -- 獲取當(dāng)前時間戳 10 select current timestamp from sysibm.sysdummy1; 11 values current timestamp ; 12 13 -- 要使當(dāng)前時間或當(dāng)前時間戳記調(diào)整到 GMT/CUT,則把當(dāng)前的時間或時間戳記減去當(dāng)前時區(qū)寄存器: 14 15 values current time - current timezone; 16 values current timestamp - current timezone; 17 18 -- 獲取當(dāng)前年份 19 20 values year ( current timestamp ); 21 22 -- 獲取當(dāng)前月 23 values month ( current timestamp ); 24 25 -- 獲取當(dāng)前日 26 values day ( current timestamp ); 27 28 -- 獲取當(dāng)前時 29 values hour( current timestamp ); 30 31 -- 獲取分鐘 32 values minute( current timestamp ); 33 34 -- 獲取秒 35 values second( current timestamp ); 36 37 -- 獲取毫秒 38 values microsecond( current timestamp ); 39 40 -- 從時間戳記單獨(dú)抽取出日期和時間 41 42 values date( current timestamp ); 43 values VARCHAR_FORMAT( current TIMESTAMP , ' yyyy-mm-dd ' ); 44 values char ( current date); 45 values time( current timestamp ); 46 47 -- 執(zhí)行日期和時間的計(jì)算 48 49 values current date + 1 year ; 50 values current date + 3 years + 2 months + 15 days; 51 values current time + 5 hours - 3 minutes + 10 seconds; 52 53 -- 計(jì)算兩個日期之間的天數(shù) 54 55 values days( current date) - days(date( ' 2010-02-20 ' )); 56 57 -- 時間和日期換成字符串 58 59 values char ( current date); 60 values char ( current time); 61 62 -- 要將字符串轉(zhuǎn)換成日期或時間值 63 64 values timestamp ( ' 2010-03-09-22.43.00.000000 ' ); 65 values timestamp ( ' 2010-03-09 22:44:36 ' ); 66 values date( ' 2010-03-09 ' ); 67 values date( ' 03/09/2010 ' ); 68 values time( ' 22:45:27 ' ); 69 values time( ' 22.45.27 ' ); 70 71 -- 計(jì)算兩個時間戳記之間的時差: 72 73 -- 秒的小數(shù)部分為單位 74 values timestampdiff( 1 , char ( current timestamp - timestamp ( ' 2010-01-01-00.00.00 ' ))); 75 -- 秒為單位 76 values timestampdiff( 2 , char ( current timestamp - timestamp ( ' 2010-01-01-00.00.00 ' ))); 77 -- 分為單位 78 values timestampdiff( 4 , char ( current timestamp - timestamp ( ' 2010-01-01-00.00.00 ' ))); 79 -- 小時為單位 80 values timestampdiff( 8 , char ( current timestamp - timestamp ( ' 2010-01-01-00.00.00 ' ))); 81 -- 天為單位 82 values timestampdiff( 16 , char ( current timestamp - timestamp ( ' 2010-01-01-00.00.00 ' ))); 83 -- 周為單位 84 values timestampdiff( 32 , char ( current timestamp - timestamp ( ' 2010-01-01-00.00.00 ' ))); 85 -- 月為單位 86 values timestampdiff( 64 , char ( current timestamp - timestamp ( ' 2010-01-01-00.00.00 ' ))); 87 -- 季度為單位 88 values timestampdiff( 128 , char ( current timestamp - timestamp ( ' 2010-01-01-00.00.00 ' ))); 89 -- 年為單位 90 values timestampdiff( 256 , char ( current timestamp - timestamp ( ' 2010-01-01-00.00.00 ' )));

?

DB2時間函數(shù)大全


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯(lián)系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長非常感激您!手機(jī)微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發(fā)表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: www.天天操| 久久影城| 国产精品一区二 | 亚洲欧美国产另类视频 | 妞干网在线观看 | 日韩精品hd | 色悠久久久久综合欧美99 | 久久99国产伦子精品免费 | 欧美视频一区二免费视频 | 国产成人自拍视频在线观看 | 欧美vide| 久久综合五月开心婷婷深深爱 | 一区二区三区国产在线 | 日日爽天天操 | 色橹橹欧美在线观看视频高清免费 | 亚洲精品一区久久狠狠欧美 | 成人av网站在线观看 | 日日干夜夜拍 | 国产欧美曰韩一区二区三区 | 欧美成人a级在线视频 | 国产伦精品一区三区视频 | www.youjizz.com亚洲| 无码免费一区二区三区免费播放 | jizzjizz日本护士视频 | 波多野结衣高清在线播放 | 欧美精品一区二区三区久久 | 黄视频在线观看网站 | 欧美在线视频一区二区三区 | 91免费观看视频 | 国产免费一级高清淫日本片 | 亚洲人成一区二区三区 | 玖草网 | 亚洲欧美激情四射 | 五月激情综合婷婷 | 高清国语自产拍免费视频国产 | 日韩天天操 | 欧美午夜精品久久久久免费视 | 欧美丰满丝袜videossex | 国产精品美女一区二区三区 | 亚洲午夜精品一区二区 | 成人精品视频 成人影院 |