久久机这里只有精品,国产69精品一区二区亚洲孕妇,91精品国产综合久久婷婷香蕉,午夜久久久久久电影

最新活動:電腦PC端+手機端+微網站+自適應網頁多模板選擇-建站388元起價!!!
當前位置:主頁 > 網站建設 > Oracle關于時間/日期的操作建站知識

Oracle關于時間/日期的操作建站知識

時間:2023-05-22 21:05:22 閱讀: 文章分類: 網站建設 作者: 網絡小編

導讀:1建站知識Oracle關于時間/日期的操作seo網站關鍵詞優化網站推廣優化seo。

seo網站關鍵詞優化網站推廣優化seo在oracle中有很多關于日期的函數,如:

  1、add_months()用于從一個日期值增加或減少一些月份

  date_value:=add_months(date_value,number_of_months)

  例:

  SQL> select add_months(sysdate,12) "Next Year" from dual;

  Nextseo網站優化培訓 Year

  ----------

  13-11月-04

  SQL> select add_months(sysdate,112) "Last Year" from dual;

  Last Year

  ----------

  13-3月 -13

 

  SQL>

  2、current_date()返回當前會放時區中的當前日期

  date_value:=current_date

  SQL> column sessiontimezone for a15

  SQL> select sessiontimezone,current_date from dual;

  SESSIONTIMEZONE CURRENT_DA

  --------------- ----------

  +08:00 13-11月-03

  SQL> alter session set time_zone='-11:00'

  2 /

  會話已更改。

  SQL> select sessiontimezone,current_timestamp from dual;

  SESSIONTIMEZONE CURRENT_TIMESTAMP

  --------------- ------------------------------------

  -11:00 12-11月-03 04.59.13.668000 下午 -11:

  00

  SQL>

  3、current_timestamp()以timestamp with time zone數據類型返回當前會放時區中的當前日期

  timestamp_with_time_zone_value:=current_timestamp([timestamp_precision])

  SQL> column sessiontimezone for a15

  SQL> column current_timestamp format a36

  SQL> select sessiontimezone,current_timestamp from dual;

  SESSIONTIMEZONE CURRENT_TIMESTAMP

  --------------- ------------------------------------

  +08:00 13-11月-03 11.56.28.160000 上午 +08:

  00

  SQL> alter session set time_zone='-11:00'

  2 /

  會話已更改。

  SQL> select sessiontimezone,current_timestamp from dual;

  SESSIONTIMEZONE CURRENT_TIMESTAMP

  --------------- --------------------------------網站建設制作----

  -11:00 12-11月-03 04.58.00.243000 下午 -11:

  00

  SQL>

  4、dbtimezone()返回時區

  varchar_value:=dbtimezone

  SQL> select dbtimezone from dual;

  DBTIME

  ------

  -07:00

  SQL>

  5、extract()找出日期或間隔值的字段值

  date_value:=extract(date_field from [datetime_value|interval_value])

  SQL> select extract(month from sysdate) "This Month" from dual;

  This Month

  ----------

  11

  SQL> select extract(year from add_months(sysdate,36)) "3 Years Out" from dual;

關鍵詞標簽: 操作 日期

聲明: 本文由我的SEOUC技術文章主頁發布于:2023-05-22 ,文章Oracle關于時間/日期的操作建站知識主要講述日期,操作,Oracle關于時間/日期的操作建站知識1網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_5302.html

我的IDC 網站建設技術SEOUC.COM
專注網站建設,SEO優化,小程序設計制作搭建開發定制網站等,數千家網站定制開發案例,網站推廣技術服務。
  • 5000+合作客服
  • 8年從業經驗
  • 150+覆蓋行業
  • 最新熱門源碼技術文章

    主站蜘蛛池模板: 铜梁县| 嘉荫县| 青浦区| 泸溪县| 达日县| 华池县| 西华县| 江西省| 衡阳县| 张家口市| 观塘区| 麻城市| 收藏| 蒙城县| 静海县| 成武县| 沙雅县| 漳浦县| 巫溪县| 聂拉木县| 秦皇岛市| 屏东县| 安泽县| 岳阳县| 福州市| 双流县| 子洲县| 宜宾市| 江油市| 察雅县| 西和县| 晴隆县| 万山特区| 日喀则市| 屯昌县| 东辽县| 集贤县| 珠海市| 怀集县| 莱芜市| 临汾市|