Re: Access to postgres conversion

From: Vick Khera <vivek(at)khera(dot)org>
To: akp geek <akpgeek(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Access to postgres conversion
Date: 2011-06-02 16:06:16
Message-ID: BANLkTimog0YMr1-42OC=7VnBPE8Ot03qXw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 2, 2011 at 12:01 PM, akp geek <akpgeek(at)gmail(dot)com> wrote:
> The only problem I am seeing with dates as you mentioned. when I export the
> data to csv the date is getting the format of 8/1/1955 0:00:00 , but
> postgres not accepting that. Any clues?

Should work:

test=> select '8/1/1955 0:00:00'::date;
date
------------
1955-08-01
(1 row)

Time: 0.325 ms
test=> select '8/1/1955 0:00:00'::timestamp;
timestamp
---------------------
1955-08-01 00:00:00
(1 row)

at worst I guess you run the export file thru an editing filter that
removes the '0:00:00' off the date column.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ben Chobot 2011-06-02 16:32:54 Re: Need suggestion
Previous Message akp geek 2011-06-02 16:01:06 Re: Access to postgres conversion