Convert TimeStamp to Date

Поиск
Список
Период
Сортировка
От shuai@objectwareinc.com
Тема Convert TimeStamp to Date
Дата
Msg-id 17365280900058@UTIL.objectwareinc.com
обсуждение исходный текст
Ответы Re: Convert TimeStamp to Date  (Patrick Welche <prlw1@newn.cam.ac.uk>)
Список pgsql-general
Hi all,

I am trying to convert a timestamp field to a date. ('1993-08-10
17:48:41.074' to '1993-08-10').
I used date(TIMESTAMP_FIELD), but it seemed working only for date
after year 2000 and return the previous date
for any day before year 2000. Is that a bug or I just didn't
understand the function?

I am now using to_date(TIMESTAMP_FIELD,'YYYY-MM-DD'). It works but
the performance is very poor. My query is about
2-3 times slower now.

So, what is the most efficient way to cast a timestamp field to a
date?

Thank you for your time!

LS

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

Предыдущее
От: Nailah Ogeer
Дата:
Сообщение: Re: Increasing Max # of connections
Следующее
От: Patrick Welche
Дата:
Сообщение: Re: Convert TimeStamp to Date