Re: [GENERAL] date & time
Kevin Heflin <kheflin@shreve.net>
From: Kevin Heflin <kheflin@shreve.net>
To: hoelc <hoelc@pd.jaring.my>
Cc: pgsql-admin@hub.org, pgsql-admin@postgreSQL.org, pgsql-general@hub.org
Date: 1999-03-06T17:25:48Z
Lists: pgsql-general
On Sun, 7 Mar 1999, hoelc wrote:
> Hello,
> Can some one please tell me how to set the date&time in the PostgreSQL
> system?
> I try to use date('now') and time('now') to keep tract of the data and
> time when the data is inserted or updated. When I use sql " insert into
> table (data1, date_chg, time_chg) values ('abc',date('now'),time('now'))
> " to insert the date and time data, the data successfully inserted but
> when I retrive the data, it shows that the date and time is always "
> 01-01-2000 " and " 08:00:00 " , now is of couse not year 2000 and the
> time is also not 8 o'clock. Why? How should I correct this?
> I am using PostgreSQL in Linux system, and the date & time for Linux
> system are correct.
I'm not real sure, but I would try CURRENT_DATE or CURRENT_DATETIME ?
Kevin
--------------------------------------------------------------------
Kevin Heflin | ShreveNet, Inc. | Ph:318.222.2638 x103
VP/Mac Tech | 333 Texas St #619 | FAX:318.221.6612
kheflin@shreve.net | Shreveport, LA 71101 | http://www.shreve.net
--------------------------------------------------------------------