From: | Jeff Boes <jboes(at)nexcerpt(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: calculating interval |
Date: | 2002-11-22 18:34:57 |
Message-ID: | arltcd$2kfl$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Fri, 22 Nov 2002 09:26:31 -0500, praveen vejandla wrote:
> Dear All,
>
> Is there any way in postgresql to calculate the interval between two
> times excluding specific days,specific duration.
>
> Ex:
> timestamp1 : 2002-10-01 10:30AM
> timestamp2 : 2002-15-01 04:50PM
>
> suppose if i need the difference between timestamp1,timestamp2 but i
> don't want to count how many sun days are coming, i want to ignore all
> sundays in between,i want to ignore certain timings(say 10.00 AM to
> 5:00PM)s also,then how can I get the duration in this way.
>
The easiest way would be to write a function in a language that supports
some kind of date library. I'm most familiar with Perl and its
Date::Manip library, so that's what I would turn to.
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer fax 616.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
...Nexcerpt... Extend your Expertise
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Boes | 2002-11-22 18:38:17 | Re: escape single quote in INSERT command |
Previous Message | Jean-Luc Lachance | 2002-11-22 16:26:25 | Re: calculating interval |