Date functions – next_day

The Oracle/PLSQL function next_day returns the next date of the specified day of a given date.

Syntax:

NEXT_DAY(DATE, day_of_week)

Example code:

SELECT SYSDATE, NEXT_DAY(SYSDATE, 'MON') next_monday
  FROM dual

sysdate next_monday
————————————————–
12/31/2009 6:08:23 AM 1/4/2010 6:08:23 AM

Share Article/Example:
  • DotNetKicks
  • DZone
  • StumbleUpon
  • Print
  • Add to favorites
  • Digg
  • del.icio.us
  • Twitter
  • Facebook
  • LinkedIn
  • Posterous
  • Slashdot

 

 
eXTReMe Tracker