[pgsql-jp: 25664] Re: time型データの表示

Terada Tomonori ml1 @ inguz.co.jp
2002年 4月 23日 (火) 15:32:19 JST


寺田と申します。

> select id, to_char(day,'YYYY年MM月DD日') as day, 
> to_char(start,'HH24時MI分') as start from hoge where id=10 ;
> とエラーになってしまいます。
> ERROR: Function 'to_char(time, unknown)' does not exist
>        Unable to identify a function that satisfies the given argument types
>        You may need to add explicit typecasts
> 	
> to_char関数では、timestampしか指定できないのでしょうか?


select id, to_char(day,'YYYY年MM月DD日') as day, 
to_char(timestamp(day ,start),'HH24時MI分') as start
from hoge whereid=10 ;

というのは如何でしょう。

-- 
Terada Tomonori <ml1 @ inguz.co.jp>




pgsql-jp メーリングリストの案内