Re: display to_timestamp in quotas or convert to char ?

Поиск
Список
Период
Сортировка
От Scott Ribe
Тема Re: display to_timestamp in quotas or convert to char ?
Дата
Msg-id FA3EDC66-B5A8-461F-8EAD-48124674C7BB@elevated-dev.com
обсуждение исходный текст
Ответ на RE: display to_timestamp in quotas or convert to char ?  (czezz <czezz@o2.pl>)
Ответы Re: display to_timestamp in quotas or convert to char ?
Список pgsql-admin
On May 5, 2015, at 7:24 AM, czezz <czezz@o2.pl> wrote:
>
>  have already tried to convert timestamp to char like you suggested but that lead to another error.
>
> First, simply execution with NO conversion - to make sure it works like that:
> Server2=# select to_timestamp('2015-05-04 22:13:14.000', 'YYYY/MM/DD-HH24:MI:SS.FF3');
>      to_timestamp
> ------------------------
> 2015-05-04 22:13:14+02
> (1 row)
>
> Secondly, to_char():
> Server2=# select to_char(to_timestamp('2015-05-04 22:13:14.000', 'YYYY/MM/DD-HH24:MI:SS.FF3'));
> ERROR:  function to_char(timestamp with time zone) does not exist
> LINE 1: select to_char(to_timestamp('2015-05-04 22:13:14.000', 'YYYY...
>               ^
> HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
>
> And this HINT seems to be odd.

WHY are you still trying to convert to_char??? Convert the varchar field to_timestamp and be done with it.

--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice







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

Предыдущее
От: Igor Neyman
Дата:
Сообщение: Re: display to_timestamp in quotas or convert to char ?
Следующее
От: czezz
Дата:
Сообщение: Re: display to_timestamp in quotas or convert to char ?