pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Raman <ramang@smartdatainc.com>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: TIME ZONE SQL
Date: Wed, 4 Feb 2004 23:27:20 +0530
Message-ID: <018c01c3eb48$593da250$d4c7a8c0@raman> (raw)
References: <JEEKIPNAKJNCFLMOBKHGOEDKDCAA.email@juergen-cappel.de>
	<200402040928.08456.josh@agliodbs.com>

Hi Pls see this Query

I have following fields in my table "customer_events"

a) time_difference (which has values like -05:00 , +05:30, +00:00 etc)
b) start_time (has value like 11:05, 10:00 etc)
c) send_before_time (has value like 00:05, 00:10 etc)

select 
((CURRENT_TIME(0) AT TIME ZONE "interval" (time_difference)) BETWEEN 
(start_time::time - send_before_time::time) 
and start_time::time) as yesno,
current_time(0), 
CURRENT_TIME(0) AT TIME ZONE "interval" (time_difference), 
(start_time::time - send_before_time::time) as difference, 
time_difference
from 
customer_events


MY PROBLEM:

This query runs fine when i have 
time_difference value like +5:30 +5:00 i.e. works fine for positive values
but failes for negative values i.e. -7:00, -6:00 etc

I don't know WHY WHY... pls help
I am helpless.

do reply back....

Regards,
Raman Garg








view thread (7+ messages)  latest in thread

Message-ID: <018c01c3eb48$593da250$d4c7a8c0@raman>
Permalink:  ../018c01c3eb48$593da250$d4c7a8c0@raman/
Also on:    postgresql.org/message-id/018c01c3eb48$593da250$d4c7a8c0@raman

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ramang@smartdatainc.com
  Subject: Re: TIME ZONE SQL
  In-Reply-To: <018c01c3eb48$593da250$d4c7a8c0@raman>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox