Re: Compare dates.

From: Alvar Freude <alvar(dot)freude(at)merz-akademie(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Compare dates.
Date: 2001-01-13 23:38:00
Message-ID: 3A60E6D8.61434DC4@merz-akademie.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Uro Gruber schrieb:
> How is possible to compare date from postgres to php. I'm using
> Postgres DATESTYLE EUROPEAN format. I get results from my table like
>
> Sun 14 Jan 01:21:55 2001 CET
>
> And i want to check if this date is older or newer like now.

SELECT ... FROM ... WHERE date_field < NOW();
SELECT ... FROM ... WHERE date_field > NOW();

Ciao
Alvar

--
Alvar C.H. Freude | alvar(dot)freude(at)merz-akademie(dot)de

Demo: http://www.online-demonstration.org/ | Mach mit!
Blast-DE: http://www.assoziations-blaster.de/ | Blast-Dich-Fit
Blast-EN: http://www.a-blast.org/ | Blast/english

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-01-14 04:17:32 Re: Need "InBetween" (not just Before and After) Trigger
Previous Message Uro Gruber 2001-01-13 23:24:34 Compare dates.