Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Adrian Klaver
On 04/08/2013 08:28 AM, Daniele Varrazzo wrote: On Mon, Apr 8, 2013 at 3:15 PM, Richard Harley wrote: That returns nothings also. But I have spied the problem now: select ATTENDANCE.timestamp::text from attendance order by timestamp desc limit 1 return the actual timestamp: 2013-04-08 12:42

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Daniele Varrazzo
On Mon, Apr 8, 2013 at 3:15 PM, Richard Harley wrote: > > That returns nothings also. But I have spied the problem now: > > select ATTENDANCE.timestamp::text from attendance order by timestamp desc > limit 1 > > return the actual timestamp: 2013-04-08 12:42:40.089952 > > So the theory I'm wonderi

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Richard Harley
That returns nothings also. But I have spied the problem now: select ATTENDANCE.timestamp::text from attendance order by timestamp desc limit 1 return the actual timestamp: 2013-04-08 12:42:40.089952 > So the theory I'm wondering about is that the stored data in fact > contains (some values with

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Tom Lane
Adrian Klaver writes: > On 04/08/2013 06:49 AM, Richard Harley wrote: >> It's >> timestamp| timestamp without time zone | default now() > Well timestamp is not time zone aware, so I have no idea where your time > zone offsets are coming from. I'm suspicious that they're being attached by so

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Adrian Klaver
On 04/08/2013 06:49 AM, Richard Harley wrote: It's Column|Type | Modifiers --+-+--- attendanceid | integer | not null default nextval(

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Richard Harley
It's Column|Type | Modifiers --+-+--- attendanceid | integer | not null default ne

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Adrian Klaver
On 04/08/2013 06:45 AM, Richard Harley wrote: I am running the query straight through PSQL so there are no other programs or adapters. The field definition is just 'timestamp'. From psql what do you get if you do?: \d attendance I did try that as well - no luck :) Rich -- Adrian Klaver

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Richard Harley
I am running the query straight through PSQL so there are no other programs or adapters. The field definition is just 'timestamp'. I did try that as well - no luck :) Rich On 8 Apr 2013, at 14:36, Adrian Klaver wrote: > On 04/08/2013 06:27 AM, Richard Harley wrote: >> Sure >> >> Timestamp

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Adrian Klaver
On 04/08/2013 06:27 AM, Richard Harley wrote: Sure Timestamp 2013/04/08 12:42:40 GMT+1 2013/04/08 12:42:33 GMT+1 2013/04/07 20:25:11 GMT+1 2013/04/07 20:19:52 GMT+1 2013/04/07 20:19:52 GMT+1 What program are you using to get the above result? What is the field definition for the timestamp col

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Richard Harley
Sure Timestamp 2013/04/08 12:42:40 GMT+1 2013/04/08 12:42:33 GMT+1 2013/04/07 20:25:11 GMT+1 2013/04/07 20:19:52 GMT+1 2013/04/07 20:19:52 GMT+1 Some are GMT, some are GMT+1 depending on when they were entered. On 8 Apr 2013, at 14:25, Adrian Klaver wrote: > On 04/08/2013 06:22 AM, Richard

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Adrian Klaver
On 04/08/2013 06:22 AM, Richard Harley wrote: This doesn't seem to work - take a normal GMT date for example: 2012/12/14 12:02:45 GMT select timestamp from attendance where timestamp = '2012/12/14 12:02:45' ..returns nothing Can you show the results of an unconstrained SELECT?: select timest

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Richard Harley
This doesn't seem to work - take a normal GMT date for example: 2012/12/14 12:02:45 GMT select timestamp from attendance where timestamp = '2012/12/14 12:02:45' ..returns nothing On 8 Apr 2013, at 14:17, Adrian Klaver wrote: > On 04/08/2013 06:03 AM, Richard Harley wrote: >> Hello all >> >

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Adrian Klaver
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

[GENERAL] Selecting timestamp from Database

2013-04-08 Thread Richard Harley
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 1