On Linux at least, this will give you the next Monday. (The one after that is "left as an exercise for the reader". ;-) $ date -d "next Monday" +%d%m%Y ________________________________ From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Roger Xu Sent: Thursday, January 07, 2010 9:38 AM To: Harel Safra Cc: oracle-l@xxxxxxxxxxxxx Subject: Re: next two mondays Thanks a lot! (If anyone knows how to do this in a shell script, that will be even better.) On Wed, Jan 6, 2010 at 11:03 PM, Harel Safra <harel.safra@xxxxxxxxx> wrote: You can use the next_day function: http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/functions 104.htm#SQLRF00672 Should by something like: to_char(next_day(sysdate,'MONDAY'),'MMDDYYYY') and to_char(next_day(sysdate+7,'MONDAY'),'MMDDYYYY') Harel Safra On 07/01/2010 06:44, Roger Xu wrote: Hi list, How do I get the next two mondays in MMDDYYYY format? For instance, if we run the sql today, we want the output to be 01112010 and 01182010. Thanks, Roger Xu