|
Sybernet / Supplied Functions Reference
Release 3.00 Oct 14, 2002 |
|
The datepart and datename functions produce the specified part of a date--the year, quarter, day hour and so on--as either an integer or an ASCII string.
FUNCTION DATENAME
(
DATEPART VARCHAR2
, DATETIME DATE
)
RETURN VARCHAR2;
| Parameter | Description |
|---|---|
datepart |
Date Part Abbreviation Values ------------- -------------- --------------------------------- year yy 1753 - 9999 quarter qq 1 - 4 month mm 1 - 12 dayofyear dy 1 - 366 day dd 1 - 31 week wk 1 - 54 weekday dw 1 - 7 (1 is Sunday in us_english) hour hh 0 - 23 minute mi 0 - 59 second ss 0 - 59 |
datetime |
A date value. |
Part of a date value as an ASCII string.
The following example illustrates how to call datename.
select datename('month',sysdate) from dual;
--------------
October