From: | "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com> |
---|---|
To: | Zsolt Varga <redax(at)agria(dot)hu>, Petter Reinholdtsen <pere(at)hungry(dot)com> |
Cc: | pgsql-sql(at)postgreSQL(dot)org |
Subject: | RE: [SQL] 'now - 4 hours ago' ? |
Date: | 1998-06-19 17:22:01 |
Message-ID: | F10BB1FAF801D111829B0060971D839F2E8C3F@cpsmail |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> On Thu, 18 Jun 1998, Petter Reinholdtsen wrote:
>
> | CREATE TABLE testdate(
> | received timestamp DEFAULT CURRENT_DATE,
> | info text NOT NULL
> | );
>
> I think CURRENT_DATE will be parsed to the table creation's time.
> so better to use:
>
> CREATE TABLE testdate (
> received timestamp DEFAULT timestamp(now()),
> info text NOT NULL
> );
>
> Redax
>
DATETIME has more features and a wider range than TIMESTAMP, so if I
were you that's what I'd be using.
try: SELECT NOW()::DATETIME - '@4 hours'::TIMESPAN;
I suggest sticking with DATETIME as much as you can.
-DEJ
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Doliov | 1998-06-19 20:13:52 | (no subject) |
Previous Message | Patrice Hédé | 1998-06-19 12:26:57 | Re: [SQL] Internationalisation: SELECT str (ignoring Umlauts/Accents) |