Selecting timestamp from Database

From: Richard Harley <richard(at)scholarpack(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Selecting timestamp from Database
Date: 2013-04-08 13:03:11
Message-ID: 5134386C-0F49-4E46-98D9-E2FBA34E9B2B@scholarpack.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

Cheers
Rich

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Johann Spies 2013-04-08 13:14:50 Backup advice
Previous Message Vincent Veyron 2013-04-08 09:37:42 Re: Building 3rd-party contrib/extension on Windows?