create table truc (a datetime);
CREATE
insert into truc values(current_timestamp);
INSERT 1869961 1
insert into truc values('1999-11-25 12:30:00');
INSERT 1869962 1
select * from truc;
a
--------------------------
06/12/1999 15:28:14.00 CET
25/11/1999 12:30:00.00 CET
(2 rows)
select * from truc
where a > (current_timestamp - interval '10 days');
a
--------------------------
06/12/1999 15:28:14.00 CET
(1 row)
José
Edouard DESSIOUX ha scritto:
> Hello,
>
> I've encountered a pb while making a simple request :
> A have a field date whose type is timestamp and I would like
> to make a select like :
> select * from truc
> where date > (current_timestamp - 10 days)
>
> Anyone know how I could perform such a query
>
> Txs
>
> --
> Edouard DESSIOUX
> Proverbe chien :
> "Si ca se mange pas,
> Si ca se baise pas,
> Pisse dessus !!"
>
> ************