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

Querying now()

From: A Gilmore <agilmore(at)shaw(dot)ca>
To: pgsql-novice(at)postgresql(dot)org
Subject: Querying now()
Date: 2004-12-20 00:05:45
Message-ID: 41C61759.6070406@shaw.ca (view raw or flat)
Thread:
Lists: pgsql-novice
Hello,

I have a problem I feel Im going about the wrong way but after reading 
over the date/time data types documentation a few times Im still unsure 
of how to do this.

Id like my application to do something like this :

SELECT now() AS currentTime WHERE currentTime < '$timestamp';

So if it returns a row Id know $timestamp is not in the past.  However 
when you run this it simply says 'ERROR:  column "currentTime" does not 
exist'.

Could someone offer some insight as to the correct way to accomplish this?

Thank you.
A Gilmore

Responses

pgsql-novice by date

Next:From: M. BastinDate: 2004-12-20 00:44:38
Subject: Re: Front end?
Previous:From: John DeSoiDate: 2004-12-19 05:32:47
Subject: Re: Front end?

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