zoukankan      html  css  js  c++  java
  • Oracle中Trunc和RoundDate Format Models

    ROUND and TRUNC Date Functions

    Table 7-13 lists the format models you can use with the ROUND and TRUNC date functions and the units to which they round and truncate dates. The default model, 'DD', returns the date rounded or truncated to the day with a time of midnight.

    Table 7-13 Date Format Models for the ROUND and TRUNC Date Functions

    Format ModelRounding or Truncating Unit
    CC
    SCC
    
    One greater than the first two digits of a four-digit year
    SYYYY
    YYYY
    YEAR
    SYEAR
    YYY
    YY
    Y
    
    Year (rounds up on July 1)
    IYYY
    IY
    IY
    I
    
    ISO Year
    Q
    
    Quarter (rounds up on the sixteenth day of the second month of the quarter)
    MONTH
    MON
    MM
    RM
    
    Month (rounds up on the sixteenth day)
    WW
    
    Same day of the week as the first day of the year
    IW
    
    Same day of the week as the first day of the ISO year
    W
    
    Same day of the week as the first day of the month
    DDD
    DD
    J
    
    Day
    DAY
    DY
    D
    
    Starting day of the week
    HH
    HH12
    HH24
    
    Hour
    MI
    
    Minute

    The starting day of the week used by the format models DAY, DY, and D is specified implicitly by the initialization parameter NLS_TERRITORY.

  • 相关阅读:
    C博客作业02--循环结构
    博客作业01--顺序分支结构
    C博客作业00--我的第一篇博客
    实验四
    实验三
    网络管理snmp实验
    C语言博客作业02--循环结构
    C博客作业03--函数
    循环结构
    C语言博客作业02--循环结构
  • 原文地址:https://www.cnblogs.com/joeblackzqq/p/1955928.html
Copyright © 2011-2022 走看看