Re: Get date timestamp(3) without time zone column - PGSQL 9.5

Поиск
Список
Период
Сортировка
От Patrick B
Тема Re: Get date timestamp(3) without time zone column - PGSQL 9.5
Дата
Msg-id CAJNY3it7fx5TZBLYtLiejjEmpA8TmxcZe9DfMSD9ev8zrhRW6A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Get date timestamp(3) without time zone column - PGSQL 9.5  (Sameer Kumar <sameer.kumar@ashnik.com>)
Ответы Re: Get date timestamp(3) without time zone column - PGSQL 9.5  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: Get date timestamp(3) without time zone column - PGSQL 9.5  (Lucas Possamai <drum.lucas@gmail.com>)
Список pgsql-general

You might want to share the version of PostgreSQL you are using. 

You might want to try date_trunc and AT TIMEZONE function/operators-


SELECT date_trunc('day', tasks_start at TIME ZONE 'EST')

Note: I have not tried this statement
 
Is this something you are going to use often? If that is the case then consider to re-model your query. The moment you use an expression on a column it would not use a normal BTree index.


Hmm... I see....


select date_trunc('day', TIMESTAMP '2016-08-10') FROM tasks

 And I get: 

2016-08-10 00:00:00


I actually need just the date 2016-08-10, without 00:00:00...
Any idea?

Cheers
Patrick

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Get date timestamp(3) without time zone column - PGSQL 9.5
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Get date timestamp(3) without time zone column - PGSQL 9.5