개인적인 정리

[Oracle] NEXT_DAY() 본문

DB/ORACLE

[Oracle] NEXT_DAY()

yeon.Biju 2020. 4. 10. 10:51

오라클 NEXT_DAY()

 

NEXT_DAY()

   - arugment로 전달된 date의 다음주의 명시된 요일의 date 를 구하는 함수.

   - 다음주 화요일의 날짜를 구하는 함수 ?? 

 

NEXT_DAY(date, char)

의 형태

 

NEXT_DAY returns the date of the first weekday named by char that is later than the date date. The return type is always DATE, regardless of the data type of date. The argument char must be a day of the week in the date language of your session, either the full name or the abbreviation. The minimum number of letters required is the number of letters in the abbreviated version. Any characters immediately following the valid abbreviation are ignored. The return value has same hours, minutes, and seconds component as the argument date

 

SQL> SELECT NEXT_DAY(TO_DATE('2020-04-10', 'YYYY-MM-DD'), 'TUESDAY') FROM DUAL ;

   --> 2020/04/14

 

 

 

 

 

'DB > ORACLE' 카테고리의 다른 글

[Oracle]NUMTODSINTERVAL()  (0) 2020.04.13
[Oralce] NULLIF()  (0) 2020.04.13
[Oracle] NTILE()  (0) 2020.04.13
[Oracle] NTH_VALUE()  (0) 2020.04.10
[Oracle] NCHR()  (0) 2020.04.10
[Oracle] NANVL()  (0) 2020.04.10
[Oracle] MONTHS_BETWEEN()  (0) 2020.04.10
[Oracle] MOD()  (0) 2020.04.09
Comments