Re: Finding first saturday of month
Date: Mon, 1 Mar 2004 20:32:44 -0500
Message-ID: <ToCdnUKDFcjeed7dRVn-hw_at_comcast.com>
"George Ziniewicz" <zin1_at_cox.net> wrote in message
news:ZoQ0c.5727$506.3314_at_fed1read05...
|
|
| "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?
|
| This appears to work for me:
|
| trunc(to_date(year||month),'D')+6 from dual
|
| zin
| --- http://www.zintel.com
|
|
zin,
you might want to try again (seriously, no sarcasm intended)
this expression (even with the added SELECT) doesn't run, and if it did, adding 6 days to a date value only returns a saturday if the date is known to be a sunday -- so to use something like this to find the first saturday of the month, you'd have to first find the last sunday of the prior month
did you have something else in mind when you posted this?
;-{ mcs Received on Tue Mar 02 2004 - 02:32:44 CET