Re: Selecting timestamp from Database

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Selecting timestamp from Database
Дата
Msg-id 5162C370.3020302@gmail.com
обсуждение исходный текст
Ответ на Selecting timestamp from Database  (Richard Harley <richard@scholarpack.com>)
Ответы Re: Selecting timestamp from Database
Список pgsql-general
On 04/08/2013 06:03 AM, Richard Harley wrote:
> Hello all
>
> Pretty sure this should be simple - how can I select a timestamp from a
> database?
>
> The timestamp is stored in the db like this:
>
> 2013/04/08 13:54:41 GMT+1
>
>
> How can I select based on that timestamp?
>
> At the simplest level "select timestamp from attendance where timestamp
> = '2013/04/08 13:54:41 GMT+1'"
>
> ..doesn't obviously work but I've tried all sorts of to_char and
> to_timestamp combos to no avail..
>
> Any ideas?

select timestamp from attendance where timestamp  = '2013/04/08 13:54:41+1'

>
> Cheers
> Rich


--
Adrian Klaver
adrian.klaver@gmail.com


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

Предыдущее
От: Johann Spies
Дата:
Сообщение: Backup advice
Следующее
От: Richard Harley
Дата:
Сообщение: Re: Selecting timestamp from Database