Oracle

Date Functions

Figo Kim 2006. 8. 30. 19:36
  • MONTHS_BETWEEN : NUmber of months between two dates
    MONTHS_BETWEEN(date1,date2)
    The result canbe positive or negative
  • ADD_MONTHS : Add calendar months to date
    ADD_MONTHS(date, n)
    "n" must be an integer and can be negative
  • NEXT_DAY : Next day of the date specified
    NEXT_DAY(date, 'char')
    The value of char must be a number representing a day or a character string.
  • LAST_DAY : Last day of the month
    LAST_DAY(date) : Find s the date of the last day of the month that contains date
  • ROUND : Round Date
    ROUND(date[,'fmt']) fmt ==> format model
  • TRUNC : Truncate date
    TRUNC(date[,'fmt']) fmt ==> format model