Date help

Started by Brian C. Doyleabout 25 years ago2 messagesgeneral
Jump to latest
#1Brian C. Doyle
bcdoyle@mindspring.com

What date field would i want to use for "Mon, 15 Jan 2001 11:10:28
-0500" that is how I get the data and would like to keep it as close to
that as possible???

#2Anthony E . Greene
agreene@pobox.com
In reply to: Brian C. Doyle (#1)
Re: Date help

On Mon, 15 Jan 2001 13:19:31 Brian C. Doyle wrote:

What date field would i want to use for "Mon, 15 Jan 2001 11:10:28
-0500" that is how I get the data and would like to keep it as close to
that as possible???

The "datetime" datatype stores the data as needed. To keep the output close
to what you input, use:

set DateStyle to 'Postgres';

That outputs dates like this: Tue Jan 09 06:12:11 2001 EST

Use "\h set" to see the available date styles.

Tony
--
Anthony E. Greene <agreene@pobox.com> <http://www.pobox.com/~agreene/&gt;
PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D
Chat: AOL/Yahoo: TonyG05 ICQ: 91183266
Linux. The choice of a GNU Generation. <http://www.linux.org/&gt;