| От | Bruno Wolff III |
|---|---|
| Тема | Re: Sorting on fieldtype Time? |
| Дата | |
| Msg-id | 20030709134816.GB20044@wolff.to обсуждение |
| Ответ на | Sorting on fieldtype Time? ("Bjorn T Johansen" <btj@havleik.no>) |
| Ответы |
Re: Sorting on fieldtype Time?
|
| Список | pgsql-general |
On Wed, Jul 09, 2003 at 11:24:14 +0200, Bjorn T Johansen <btj@havleik.no> wrote: > I have a small problem.. I need to sort some rows on a Time field, but > the time in these rows are recorded on evenings and nights, from 2200 to > 0600 for instance. The problem is that the time after midnight should > come after the time before midnight, i.e. 2315, 2345, 0015, 0100 should > be sorted in this order and not 0015, 0100, 2315,2345. > Is there a solution to this, other than using Timestamp instead of Time? You could do something like like: select timecol from timetab order by timecol <= 1200, timecol;
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера