Re: Select date & time

Поиск
Список
Период
Сортировка
Искать
От
Andreas Kretschmer
Тема
Re: Select date & time
Дата
Msg-id
20060204211324.GB23797@KanotixBox
Ответ на
Select date & time (Jan Danielsson)
Список
Дерево обсуждения
Select date & time Jan Danielsson <jan.danielsson@gmail.com>
Re: Select date & time Andreas Kretschmer <akretschmer@spamfence.net>
Jan Danielsson  schrieb:
> This will yield an entry which looks something like:
> 
>            ts
> ---------------------------
> 2006-02-04 19:27:31.123456
> 
>    I'm interested in retaining this information in the database, but not
> when I'm going to present it. I.e. I want to be able to create a query
> that will return:
> 
>     date   |   time   |
> -----------+----------+----
> 2006-02-04 | 19:27:31 |

Read the manual about to_char:
http://www.postgresql.org/docs/8.1/interactive/functions-formatting.html

and

http://www.postgresql.org/docs/8.1/interactive/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT


HTH, Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°
В списке pgsql-novice по дате отправления
От: Andreas Kretschmer
Дата:
От: Andreas Kretschmer
Дата:
Сообщение: Re: Backing Up
FAQ