pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gerardo Herzig <gherzig@fmed.uba.ar>
To: pgsql-sql@postgresql.org
Subject: Re: current_date / datetime stuff
Date: Tue, 05 Jun 2007 15:01:26 -0300
Message-ID: <4665A4F6.8040501@fmed.uba.ar> (raw)
In-Reply-To: <EFC1C078-4624-4E97-85C8-EB5C3EDAE6FB@skype.net>
References: <46642A05.40708@joshuaneil.com>
	<20070604152736.GS32320@phlogiston.dyndns.org>
	<F7C976F3-68DB-4D96-B992-875F5F40757D@seespotcode.net>
	<7B00D29F-089A-4A19-B9C1-0FF8A949DDA3@seespotcode.net>
	<EFC1C078-4624-4E97-85C8-EB5C3EDAE6FB@skype.net>

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:
>




view thread (10+ messages)  latest in thread

Message-ID: <4665A4F6.8040501@fmed.uba.ar>
Permalink:  ../4665A4F6.8040501@fmed.uba.ar/
Also on:    postgresql.org/message-id/4665A4F6.8040501@fmed.uba.ar

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gherzig@fmed.uba.ar
  Subject: Re: current_date / datetime stuff
  In-Reply-To: <4665A4F6.8040501@fmed.uba.ar>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox