Re: [GENERAL] datetime datatype question

From: "Patrick Welche" <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
To: kheflin(at)shreve(dot)net (Kevin Heflin)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] datetime datatype question
Date: 1999-10-01 19:53:52
Message-ID: E11X8ka-0005Bj-00@quartz.newn.cam.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kevin Heflin wrote:
>
>
> 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 ?

rfb=> \h set
Command: set
Description: set run-time environment
Syntax:
SET DATESTYLE TO 'ISO'|'SQL'|'Postgres'|'European'|'US'|'NonEuropean'

it looks like

set datestyle to 'ISO'

to me..

Cheers,

Patrick

PS you could also set the environment variable PGDATESTYLE to ISO...

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 1999-10-01 20:14:54 Re: [GENERAL] alpha and true64 port
Previous Message Kevin Heflin 1999-10-01 19:37:46 datetime datatype question