Re: System Date

From: "Negandhi, Nishith" <Nishith(dot)Negandhi(at)infoUSA(dot)com>
To: "Benjamin Krajmalnik" <kraj(at)illumen(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: System Date
Date: 2007-01-19 00:04:16
Message-ID: FE0C41EEBEF01C47BF3A91F60669446804973251@PUNISHER.intra.infousa.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Thanx..one more help.
I am creating a function that will retuen the current systemdate.

CREATE FUNCTION "CreateDate"() RETURNS date AS
'select now();'
LANGUAGE 'plpgsql';

However, I get the error:

ERROR: syntax error at or near "select" at character 51

Any suggestions .??

Thanks in advance

________________________________

From: Benjamin Krajmalnik [mailto:kraj(at)illumen(dot)com]
Sent: Thursday, January 18, 2007 5:31 PM
To: Negandhi, Nishith; pgsql-admin(at)postgresql(dot)org
Subject: RE: [ADMIN] System Date

select CURRENT_TIMESTAMP

or

select LOCALTIMESTAMP

the first has the information with the timezone offset at the end,
whereas the second does not.

________________________________

From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Negandhi, Nishith
Sent: Thursday, January 18, 2007 3:43 PM
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] System Date


Hi,
How to check the system date using PG/SQL ??

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Chad Wagner 2007-01-19 00:10:55 Re: System Date
Previous Message Benjamin Krajmalnik 2007-01-18 23:31:04 Re: System Date