Re: Problem with to_date/to_char

Поиск
Список
Период
Сортировка
От Karel Zak
Тема Re: Problem with to_date/to_char
Дата
Msg-id 20030905103852.GA15335@zf.jcu.cz
обсуждение исходный текст
Ответ на Problem with to_date/to_char  ("Amin Schoeib" <aschoeib@4tek.de>)
Список pgsql-general
On Fri, Sep 05, 2003 at 11:26:05AM +0200, Amin Schoeib wrote:
> Hi,
> Can somebody tell me why this query don't work when I use to_date
> Instead of to_char
>
> By using to_char:
>
> select
>  to_char(last_day(cast(current_date - interval '1 month' as date)),'DD.MM.YYYY')
>  ;
>
> Result:  31.08.2003
>
> By using to_date:
>
> select
>  to_date(last_day(cast(current_date - interval '1 month' as date)),'DD.MM.YYYY')
>  ;

 to_date() do conversion from 'string' to 'data' .... see docs.

    Karel

--
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

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

Предыдущее
От: Sergey Suleymanov
Дата:
Сообщение: default EXECUTE privilege
Следующее
От: Csaba Nagy
Дата:
Сообщение: Re: Replaceing records