pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Edmund Bacon <ebacon@onesystem.com>
To: pgsql-sql@postgresql.org
Subject: Re: help with to_date and to_char
Date: Tue, 19 Oct 2004 17:05:08 -0600
Message-ID: <41759DA4.6070803@onesystem.com> (raw)
In-Reply-To: <41759C78.1040101@onesystem.com>
References: <416C74CC.6030309@dri.edu>
	<9E1E7300-2215-11D9-A5E5-000D93AE0944@sitening.com>
	<41759C78.1040101@onesystem.com>

Edmund Bacon wrote:
>  When current_date is, say Aug 31 then
> 
> select to_char( to_date('05' || '/' || to_char(current_date, 'DD/YYYY'),
>                 'MM/DD/YYYY' ), 'MON' );
>

NUTS! that should have been
   select ... to_date('02' || ...

{ cut, paste, ?edit? }

> returns 'MAR', which is probably not what you want.
> 
> This works with 7.3.2, 7.4.5 and 8.0beta2.
> 
-- 
Edmund Bacon <ebacon@onesystem.com>



view thread (6+ messages)  latest in thread

Message-ID: <41759DA4.6070803@onesystem.com>
Permalink:  ../41759DA4.6070803@onesystem.com/
Also on:    postgresql.org/message-id/41759DA4.6070803@onesystem.com

 · 

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: ebacon@onesystem.com
  Subject: Re: help with to_date and to_char
  In-Reply-To: <41759DA4.6070803@onesystem.com>

* 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