datetime problems
| От | Memphisto |
|---|---|
| Тема | datetime problems |
| Дата | |
| Msg-id | Pine.GSO.3.96.981021133209.13780C-100000@valerie.inf.elte.hu обсуждение исходный текст |
| Ответ на | re: Help...(summerd@cs.unm.edu) ("Carilda A. Thomas" <agacat@earthlink.net>) |
| Ответы |
Re: [GENERAL] datetime problems
|
| Список | pgsql-general |
I'd like to issue a query that lists all the rows of a table whose 'date'
columns(its type is datetime) is falls in a month, i.e. these rows were
inserted in , say August. How can I do that?
When I bugged with that problem I found an interesting bug:
elmu=> select date_trunc('month','now'::datetime);
date_trunc
-----------------------------
Thu Oct 01 00:00:00 1998 CEST
(1 row)
That's OK.
elmu=> select date_trunc('month','now'::datetime) + timespan('1
month'::reltime)
;
?column?
----------------------------
Sat Oct 31 23:00:00 1998 CET
(1 row)
Why not Nov 1?
--------------------------------------------------------------------------------
Sebestyén Zoltán AKA Memphisto It all seems so stupid,
it makes me want to give up.
szoli@neumann.cs.elte.hu But why should I give up,
when it all seems so stupid?
MAKE INSTALL NOT WAR And please avoid Necrosoft Widows
В списке pgsql-general по дате отправления: