<menu id="guoca"></menu>
<nav id="guoca"></nav><xmp id="guoca">
  • <xmp id="guoca">
  • <nav id="guoca"><code id="guoca"></code></nav>
  • <nav id="guoca"><code id="guoca"></code></nav>

    oracle日期格式轉換 yyyymmdd


    發現錯別字 1年前 提問
    回答
    1
    瀏覽
    11884
    請勿發布不友善或者負能量的內容。與人為善,比聰明更重要!
    回答數量: 1

    oracle日期格式轉換yyyymmdd方法一般使用“select to_char(sysdate,’yyyymmdd’) strDateTime from dual;”命令來進行操作,因為要將日期格式變為yyyymmdd的意思是只顯示年月日并且中間沒有連接符號,所以該命令就是先獲取當然計算機的年月日然后將結果輸出,同時這個也可以將日期格式轉換為字符串。

    以下是其他幾種Oracle轉換日期格式的命令:

    • select to_char(sysdate,’yyyy-mm-dd hh24:mi :ss’) strDateTime from dual;

    • select to_char(sysdate,’yyyymmdd hh24:mi :ss’) strDateTime from dual;

    • select to_char(sysdate,’yyyy’) strYear from dual;

    • select to_char(sysdate,’mm’) strMonth from dual;

    • select to_char(sysdate,’dd’) strDay from dual;

    • select to_char(sysdate,’hh24’) strHour from dual;

    • select to_char(sysdate,’mi’) strMinute from dual;

    • select to_char(sysdate,’ss’) strSecond from dual;

    回答所涉及的環境:聯想天逸510S、Windows 10。

    1年前 / 評論
    亚洲 欧美 自拍 唯美 另类