From: Korshunov Ilya <kosha@Kp.ru>
To: community@altlinux.ru
Subject: Re: [Comm] PostgreSQL question
Date: Wed, 30 Oct 2002 17:53:07 +0400
Message-ID: <200210301653.07703.kosha@Kp.ru> (raw)
In-Reply-To: <200210301620.22389.webmaster@unicon-ms.ru>
В сообщении от 30 Октябрь 2002 16:20 Leonid Sysoletin написал:
> Среда, 30 Октябрь 2002 16:02, Korshunov Ilya написал:
> > Никак не въеду как сделать выборку с таблицы с указанием точного врмени..
> > к примеру мне надо выбрать все записи с датой с 16.00 до 19.00 27
> > Октября. В таблице присутвует поле timestamp вида
> > 2002-09-05 17:04:04+04
> > Может подскажте что-нибудь умное, люди добрые. Ж)
>
> Извращаться - так с музыкой.
>
> SELECT *
> FROM table_name
> WHERE extract (hour from interval (timestamp ('2002-10-27 19:00:00') -
> timestamp_field_name)) <= 3 AND extract (days from interval (timestamp
> ('2002-10-27 19:00:00') - timestamp_field_name)) = 0
Во....примерно до этого я дошел ))....только не работало ))).
Хотя первый вариант от ALex Smirnov выглядит попроще
Спасибо всем!
--
WBR
Korshunov Ilya
prev parent reply other threads:[~2002-10-30 13:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-30 13:02 Korshunov Ilya
2002-10-30 13:16 ` Smirnov Alexey
2002-10-30 13:20 ` Leonid Sysoletin
2002-10-30 13:53 ` Korshunov Ilya [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200210301653.07703.kosha@Kp.ru \
--to=kosha@kp.ru \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git