Re: dow question

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: dow question
Дата
Msg-id E4B9C5CF-8776-4335-B819-D32E64A15DDC@myrealbox.com
обсуждение исходный текст
Ответ на dow question  (Keith Worthington <KeithW@NarrowPathInc.com>)
Ответы Re: dow question  (Keith Worthington <KeithW@NarrowPathInc.com>)
Список pgsql-sql
On Dec 8, 2005, at 11:03 , Keith Worthington wrote:

> Is there a better way to do this?  The CASE seems inefficient and  
> wordy but perhaps not.
>
> I was hoping for
>
> day_name(tbl_detail.ship_by_date) || tbl_detail.ship_by_date::text  
> AS sort_by_string
>
> but AFAIK day_name(date) or something like it is merely my  
> fantasy. ;-)

Will to_char() do what you want? Something like

test=# select to_char(current_date, 'Day YYYY-MM-DD');       to_char
----------------------
Thursday  2005-12-08
(1 row)

http://www.postgresql.org/docs/current/interactive/functions- 
formatting.html

Michael Glaesemann
grzm myrealbox com





В списке pgsql-sql по дате отправления:

Предыдущее
От: Keith Worthington
Дата:
Сообщение: dow question
Следующее
От: Keith Worthington
Дата:
Сообщение: Re: dow question