Skip site navigation (1) Skip section navigation (2)

Re: How To Create DATETIME Data Types in A Table

From: John DeSoi <desoi(at)pgedit(dot)com>
To: "Van Ingen, Lane" <lvaningen(at)ESNCC(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: How To Create DATETIME Data Types in A Table
Date: 2005-01-28 21:13:03
Message-ID: 6579407D-7171-11D9-8D86-000A95B03262@pgedit.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Jan 28, 2005, at 3:57 PM, Van Ingen, Lane wrote:

> I am converting several databases from difference database vendors in  
> PostgreSQL, but I am
> finding that PostgreSQL appears to not support this datatype, unlike  
> the other vendors we use.
> The DATETIME fields coming from the other databases look like:
>      '2005-01-27 15:55:04'
> How do I get the same effect in Postgres CREATE TABLE statement  
> without losing data?

That should correspond perfectly with the timestamp data type. See

http://www.postgresql.org/docs/8.0/interactive/datatype-datetime.html

As far is ensuring it is parsed correctly for import, look at the  
DateStyle parameter.

http://www.postgresql.org/docs/8.0/interactive/runtime-config.html#GUC- 
DATESTYLE


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


In response to

pgsql-novice by date

Next:From: Bruno Wolff IIIDate: 2005-01-28 21:29:18
Subject: Re: How To Create DATETIME Data Types in A Table
Previous:From: Van Ingen, LaneDate: 2005-01-28 20:57:47
Subject: How To Create DATETIME Data Types in A Table

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group