pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedDate/Time problem -(((
3+ messages / 3 participants
[nested] [flat]
* Date/Time problem -(((
@ 2000-12-30 09:36 Boris <koester@x-itec.de>
0 siblings, 2 replies; 3+ messages in thread
From: Boris @ 2000-12-30 09:36 UTC (permalink / raw)
To: pgsql-sql
Hello
I am moving from MySQL to Postgres and while converting my sql code I
have a lot of problems with this construction:
($ze is current time - 300 secounds):
delete from onlineuser where datum < FROM_UNIXTIME($ze)
Is there any Date/Time function in PGSQL? I want as shown in this
example delete entries older than 300 secounds.
I postet to the list because I have found no solution in the
tutorials and search-engine (maybe searched with wrong words?)
It would be great if someone could help me / point me to the right
way...
--
Boris
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Date/Time problem -(((
@ 2000-12-30 10:45 Kaare Rasmussen <kar@webline.dk>
parent: Boris <koester@x-itec.de>
1 sibling, 0 replies; 3+ messages in thread
From: Kaare Rasmussen @ 2000-12-30 10:45 UTC (permalink / raw)
To: pgsql-sql
> Is there any Date/Time function in PGSQL? I want as shown in this
> example delete entries older than 300 secounds.
>
> I postet to the list because I have found no solution in the
> tutorials and search-engine (maybe searched with wrong words?)
http://www.postgresql.org/users-lounge/docs/7.0/postgres/functions2876.htm
--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Howitzvej 75 Åben 14.00-18.00 Email: kar@webline.dk
2000 Frederiksberg Lørdag 11.00-17.00 Web: www.suse.dk
^ permalink raw reply [nested|flat] 3+ messages in thread
* RE: Date/Time problem -(((
@ 2001-01-02 11:23 Francis Solomon <francis@stellison.co.uk>
parent: Boris <koester@x-itec.de>
1 sibling, 0 replies; 3+ messages in thread
From: Francis Solomon @ 2001-01-02 11:23 UTC (permalink / raw)
To: Boris <koester@x-itec.de>; pgsql-sql
Hi Boris,
I know Kaare Rasmussen posted a URL to the online documentation already,
but this might be a direct solution to your problem:
DELETE FROM onlineuser WHERE datum < ('now'::datetime - '5
minutes'::interval);
Hope this helps
Francis Solomon
> Hello
>
> I am moving from MySQL to Postgres and while converting my sql code I
> have a lot of problems with this construction:
>
> ($ze is current time - 300 secounds):
>
> delete from onlineuser where datum < FROM_UNIXTIME($ze)
>
> Is there any Date/Time function in PGSQL? I want as shown in this
> example delete entries older than 300 secounds.
>
> I postet to the list because I have found no solution in the
> tutorials and search-engine (maybe searched with wrong words?)
>
> It would be great if someone could help me / point me to the right
> way...
>
> --
> Boris
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-01-02 11:23 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-12-30 09:36 Date/Time problem -((( Boris <koester@x-itec.de>
2000-12-30 10:45 ` Kaare Rasmussen <kar@webline.dk>
2001-01-02 11:23 ` Francis Solomon <francis@stellison.co.uk>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox