pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rodger Donaldson <rodgerd@diaspora.gen.nz>
To: pgsql-sql@postgresql.org
Subject: to_date has beaten me...
Date: Thu, 6 Feb 2003 17:02:48 +1300
Message-ID: <20030206040247.GA8032@diaspora.gen.nz> (raw)


Postgresql 7.2.3

insert	
into 	log_entries 
values	(to_date('06/Feb/2003:11:29:11 +13', 'DD/Mon/YYYY:HH24:MI:SS'),0,302,
	[... various other data elided ...]);

Always inserts the correct date, but sets the time to midnight.

Thinking this might be solved by shuffling with the source data, I've
tried such combinations as:

to_date('06/Feb/2003:11:29:11', 'DD/Mon/YYYY:HH24:MI:SS')
to_date('06/Feb/2003:11:29:11 +13', 'DD/Mon/YYYY:HH:MI:SS')
to_date('06/02/2003:11:29:11', 'DD/MM/YYYY:HH24:MI:SS')

...and so forth, but despite the column in question being a timestamp
with timszone, everything except the date gets truncated.

-- 
Rodger Donaldson		rodgerd@diaspora.gen.nz
"My ATEX terminal isn't working"
"Is there power to the keyboard?"
"No, and it has smoke and flames coming out of it"



view thread (5+ messages)  latest in thread

Message-ID: <20030206040247.GA8032@diaspora.gen.nz>
Permalink:  ../20030206040247.GA8032@diaspora.gen.nz/
Also on:    postgresql.org/message-id/20030206040247.GA8032@diaspora.gen.nz

 · 

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: rodgerd@diaspora.gen.nz
  Subject: Re: to_date has beaten me...
  In-Reply-To: <20030206040247.GA8032@diaspora.gen.nz>

* 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