Compare dates.

Started by Uros Gruberabout 25 years ago2 messagesgeneral
Jump to latest
#1Uros Gruber
uros@sir-mag.com

Hi!

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.

I know this is not total postgres question, but....

Thanks

--
Uroďż˝

#2Alvar Freude
alvar.freude@merz-akademie.de
In reply to: Uros Gruber (#1)
Re: Compare dates.

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.freude@merz-akademie.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