pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Roberto Mello <rmello@cc.usu.edu>
To: Rodger Donaldson <rodgerd@diaspora.gen.nz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: to_date has beaten me...
Date: Wed, 5 Feb 2003 22:06:35 -0700
Message-ID: <20030206050635.GB19492@cc.usu.edu> (raw)
In-Reply-To: <20030206042539.GA8420@diaspora.gen.nz>
References: <20030206040247.GA8032@diaspora.gen.nz>
	<9133.1044505377@sss.pgh.pa.us>
	<20030206042539.GA8420@diaspora.gen.nz>

On Thu, Feb 06, 2003 at 05:25:39PM +1300, Rodger Donaldson wrote:
> On Wed, Feb 05, 2003 at 11:22:57PM -0500, Tom Lane wrote:
> > Rodger Donaldson <rodgerd@diaspora.gen.nz> writes:
> > > values	(to_date('06/Feb/2003:11:29:11 +13', 'DD/Mon/YYYY:HH24:MI:SS'),0,302,
> > 
> > > Always inserts the correct date, but sets the time to midnight.
> > 
> > Um, well, yeah ... it's to_DATE, meaning it produces a result of type
> > date.  I think you wanted to_timestamp().
> 
> Why yes.  Yes I did.  Too much time spent with Oracle, evidently.
> Next I'll be wondering why DECODE doesn't work...

Because DECODE is non-standard AFAIK. You can use CASE WHEN in PostgreSQL,
which IIRC, started being supported in Oracle 8.1.7.

-Roberto

-- 
+----|        Roberto Mello   -    http://www.brasileiro.net/  |------+
+       Computer Science Graduate Student, Utah State University      +
+       USU Free Software & GNU/Linux Club - http://fslc.usu.edu/     +
The linuX Files -- The Source is Out There.
	-- Sent in by Craig S. Bell, goat@aracnet.com



view thread (5+ messages)  latest in thread

Message-ID: <20030206050635.GB19492@cc.usu.edu>
Permalink:  ../20030206050635.GB19492@cc.usu.edu/
Also on:    postgresql.org/message-id/20030206050635.GB19492@cc.usu.edu

 · 

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: rmello@cc.usu.edu, rodgerd@diaspora.gen.nz, tgl@sss.pgh.pa.us
  Subject: Re: to_date has beaten me...
  In-Reply-To: <20030206050635.GB19492@cc.usu.edu>

* 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