Re: problem with date/time constants

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: datactrl <quals(at)bigfoot(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: problem with date/time constants
Date: 2001-07-03 13:31:25
Message-ID: 200107031331.f63DVQl18812@jupiter.us.greatbridge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

datactrl wrote:
> Hi,
> server:PostgreSQl 7.1
> why doesn't following statement work?
> "select now;"

Because it's not standard SQL and now is a function.

Use either

SELECT CURRENT_TIMESTAMP;

which is standard (preferred) or

SELECT now();

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jeff Eckermann 2001-07-03 14:08:20 RE: How do I print a message in a function?
Previous Message Alex Pilosov 2001-07-03 13:08:48 Re: problem with date/time constants