true, didn't test it that thoroughly: mod 7 should be bit more beautiful
select date_trunc('month',now()) + ( ((8 - extract('dow' from
date_trunc('month',now()))%7) ||'days')::text)::interval;
On 06.06.2007, at 18:54, Osvaldo Rosario Kussama wrote:
Kristo Kaiv escreveu:
oneliner:
select da
Kristo Kaiv escreveu:
oneliner:
select date_trunc('month',now()) + ((8 - extract('dow' from
date_trunc('month',now()))||'days')::text)::interval;
There is a problem when first monday is 1st or 2nd day of month.
bdteste=# SELECT date_trunc('month',meses) + ((8 - extract('dow' from
date_t
On 6/5/07, Gerardo Herzig <[EMAIL PROTECTED]> wrote:
We should have a onliner contest. I love oneliners!!!
+1 on that
---(end of broadcast)---
TIP 6: explain analyze is your friend
We should have a onliner contest. I love oneliners!!!
oneliner:
select date_trunc('month',now()) + ((8 - extract('dow' from date_trunc
('month',now()))||'days')::text)::interval;
Kristo
On 04.06.2007, at 19:39, Michael Glaesemann wrote:
---(end of broadcast)--
oneliner:
select date_trunc('month',now()) + ((8 - extract('dow' from date_trunc
('month',now()))||'days')::text)::interval;
Kristo
On 04.06.2007, at 19:39, Michael Glaesemann wrote:
On Jun 4, 2007, at 10:59 , Michael Glaesemann wrote:
On Jun 4, 2007, at 10:27 , Andrew Sullivan wrote:
On Jun 4, 2007, at 10:59 , Michael Glaesemann wrote:
On Jun 4, 2007, at 10:27 , Andrew Sullivan wrote:
On Mon, Jun 04, 2007 at 10:04:37AM -0500, Joshua wrote:
that will return the date of the first Monday of the month?
I guess you need to write a function to do this. I suppose you could
On 6/4/07, Joshua <[EMAIL PROTECTED]> wrote:
Hello,
I was hoping someone here may be able to help me out with this one:
Is there anything similiar to: SELECT current_date;
that will return the date of the first Monday of the month?
Please let me know.
Thanks,
Joshua
select (
select
ca
On Jun 4, 2007, at 10:27 , Andrew Sullivan wrote:
On Mon, Jun 04, 2007 at 10:04:37AM -0500, Joshua wrote:
that will return the date of the first Monday of the month?
I guess you need to write a function to do this. I suppose you could
do it by finding out what day of the week it is and what
On Mon, Jun 04, 2007 at 10:04:37AM -0500, Joshua wrote:
> that will return the date of the first Monday of the month?
I guess you need to write a function to do this. I suppose you could
do it by finding out what day of the week it is and what the date is,
then counting backwards to the earliest
Hello,
I was hoping someone here may be able to help me out with this one:
Is there anything similiar to: SELECT current_date;
that will return the date of the first Monday of the month?
Please let me know.
Thanks,
Joshua
---(end of broadcast)--
10 matches
Mail list logo