Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.oracle -> Re: Finding first saturday of month

Re: Finding first saturday of month

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Sat, 28 Feb 2004 07:17:13 -0500
Message-ID: <1pCdnQPcaP9QG93dRVn-hA@comcast.com>

"Frank van Bortel" <fvanbortel_at_netscape.net> wrote in message news:c1q0ck$8lk$1_at_news4.tilbu1.nb.home.nl...
| Mark C. Stock wrote:
| > "Solomon Grundy" <logicjello_at_netscape.net> wrote in message
| > news:6ad4e542.0402271226.6f8d8e63_at_posting.google.com...
| > | Select trunc(sysdate,'MM')
| > | from dual
| > | of course gives me the first day of the month, may I ask what the
| > | query is to find the first saturday of the month?
| >
| > check out the NEXT_DAY function
| >
| > ;-{ mcs
| >
| >
|
| And be careful with trunc(sysdate):
| SQL> select trunc(sysdate,'MM') from dual;
|
| TRUNC(SYSDATE,'
| ---------------
| 01-FEB-04
|
| --
|
| Regards,
| Frank van Bortel
|

frank,

the OP was intending to use trunc(sysdate,'MM'), which reliably returns the first day of the current month -- in what way are you suggesting to be careful with trunc(sysdate)?

;-{ mcs Received on Sat Feb 28 2004 - 06:17:13 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US