Re: SQL: Getting all Monday's in a year

From: Rick Murtagh <rmurtagh_at_znet.com>
Date: 26 Feb 1995 11:54:00 GMT
Message-ID: <3ipq4o$bef_at_news.znet.com>


In article <8jHTwKS00VBKM1J1Nj_at_andrew.cmu.edu>, Serge Taylor <st0u+_at_andrew.cmu.edu> says:
>
>Is there some easy way to find out the dates of all Monday's in a
>given year. I'm trying to avoid generating every date and then culling.
>Thanks,
>Serge Taylor
>CMU
Serge,

You could try the TO_CHAR function in the WHERE clause.

    ... WHERE TO_CHAR(date, "day") = 'monday' ...

DAY = MONDAY
Day = Monday
day = monday
DY  = MON
Dy  = Mon
dy  = mon
D   = 2

Watch out for the NLS_TERRITORY option.

Rick Received on Sun Feb 26 1995 - 12:54:00 CET

Original text of this message