Skip site navigation (1) Skip section navigation (2)

Re: Time problem again?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Bjørn T Johansen <btj(at)havleik(dot)no>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Time problem again?
Date: 2003-09-30 08:42:39
Message-ID: 200309300942.39576.dev@archonet.com (view raw or flat)
Thread:
Lists: pgsql-general
On Tuesday 30 September 2003 09:00, Bjørn T Johansen wrote:
> Why can't you just take my word for it, this is the way it should be
> sorted....

I'm happy to take your word, but until I can figure out what rules you're 
using I can't suggest anything. You clearly know what you want, but I can't 
get to grips with precisely what that is.

> The reason I know this, is because the timespan, as I have mention
> before, from first record to last record is always less than 12 hours.
> i.e the span from 0200 to 2200 is 20 hours, i.e. 2200 comes before 0200!

Ah - you said 24 hours originally, which means that all the examples we've 
looked at were valid. Apologies if I missed the 12-hour bit.

So - your rule is something like:

For some block of times...
  IF max(my_time) - min(my_time) > 12 hours
  THEN sort "through midnight"
  ELSE sort "naturally"

Which is what Tom said (I was wondering where he got his 12 hours from).
Have I got that right?

-- 
  Richard Huxton
  Archonet Ltd

In response to

Responses

pgsql-general by date

Next:From: Angel TodorovDate: 2003-09-30 08:43:19
Subject: pg_hba.conf
Previous:From: Bjørn T JohansenDate: 2003-09-30 08:00:25
Subject: Re: Time problem again?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group