Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group