First Saturday and Last Saturday of a month - Mailing list pgsql-general

From Brian C. Doyle
Subject First Saturday and Last Saturday of a month
Date
Msg-id 5.1.0.14.2.20010808131935.00b2fa40@proxy
Whole thread Raw
List pgsql-general
Hello all,

I have a Function that gives me the fsunday of a week Based on the date you
give it the select looks like
SELECT Date('now') - timespan( text( date_part( 'dow', Date('now') ) ) ||
'days' )
and if you run that today you will get
       ?column?
------------------------
  2001-08-05 00:00:00-04
(1 row)

Which is what I want it to do ...

Now I need to setup a function that will give me the first Saturday of the
month and then one to get the Last Saturday of the month.

I know that sounds odd but it is necessary for pulling information out of a
database.


Thank you all for you help.

Brian


pgsql-general by date:

Previous
From: Jim Caley
Date:
Subject: Re: Upgrade 7.0.2 -> 7.1.2: Errors during Restore
Next
From: Ryan Mahoney
Date:
Subject: integer quoting