Re: [GENERAL] datetime datatype question

From: jose soares <jose(at)sferacarta(dot)com>
To: Kevin Heflin <kheflin(at)shreve(dot)net>
Cc: "PGSQL-General (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] datetime datatype question
Date: 1999-10-04 12:17:08
Message-ID: 37F89AC3.BA386FC6@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kevin Heflin ha scritto:

> If from the psql command line I use select current_timestamp it shows like
> this:
>
> 1999-10-01 14:30:53-05
>
> However if I insert into a datetime field, when I do a select it formats
> it like so:
>
> Sun Oct 03 10:00:00 1999 CDT
>
> Is there a way I can retrieve the information from a datetime field, and
> format it like the first example ?

Yes. Use TIMESTAMP data type instead of DATETIME.

José

>
>
> Kevin
>
> --------------------------------------------------------------------
> Kevin Heflin | ShreveNet, Inc. | Ph:318.222.2638 x103
> Production | 333 Texas St #175 | FAX:318.221.6612
> kheflin(at)shreve(dot)net | Shreveport, LA 71101 | http://www.shreve.net
> --------------------------------------------------------------------
>
> ************

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Floridashe 1999-10-04 13:25:20 Re: mysql-unsubscribe@lists.mysql.com...here is the solution
Previous Message Scott Perkins 1999-10-04 10:01:46 [Fwd: [PHP3] Re: PostgreSQL vs Mysql comparison]