pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
To: Adam H. Pendleton <apendleton@vgsinc.com>
Cc: pgsql-interfaces@hub.org
Subject: Re: [INTERFACES] Java and PGSQL date question
Date: Mon, 10 May 1999 18:04:06 +0000
Message-ID: <37371F96.6A420D76@alumni.caltech.edu> (raw)
References: <001f01be9b03$64b82730$bdd0be80@belvoir.army.mil>

> I am trying to pass a date from Java into a PostgreSQL database.  I am using
> the DateFormat.parse() funcitonality to format the date.  However, the
> database doesn't want to take it?  I looked at the PGSQL documentation and
> it says that the default date type is postgresql date type, which is: Wed
> Dec 17 07:37:16 1997 PST.  Java is sending the date in this format: Wed Dec
> 17 07:37:16 PST 1997.  How do I make this work.   Is it easier to change the
> Java format or the PGSQL format?

postgres=> select 'Wed Dec 17 07:37:16 PST 1997'::datetime;
?column?                    
----------------------------
Wed Dec 17 15:37:16 1997 UTC
(1 row)

Looks good to me. Does this work from psql on your db? If so, then the
problem lies elsewhere...

                       - Tom

-- 
Thomas Lockhart				lockhart@alumni.caltech.edu
South Pasadena, California



view thread (3+ messages)  latest in thread

Message-ID: <37371F96.6A420D76@alumni.caltech.edu>
Permalink:  ../37371F96.6A420D76@alumni.caltech.edu/
Also on:    postgresql.org/message-id/37371F96.6A420D76@alumni.caltech.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-interfaces@postgresql.org
  Cc: lockhart@alumni.caltech.edu, apendleton@vgsinc.com, pgsql-interfaces@hub.org
  Subject: Re: [INTERFACES] Java and PGSQL date question
  In-Reply-To: <37371F96.6A420D76@alumni.caltech.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