🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #965

Re: Date/Time manipulation

#965
From: Quinn Wildman (CodeGear Develope...
Date: Fri, 30 Mar 2007 18:11
26 lines
1529 bytes
I suspect adding d to another timestamp or time will do what you want.

Assen Krastev wrote:
> In a stored proc:
> ...
> returns (t timestamp)
> as
> declare variable time1 as timestamp;
> declare variable time2 as timestamp;
> declare variable d as double precision;
> begin
>   ...
>   d=time2-time1;
>   t=cast(d as timestamp);<---- error
>   suspend;
> end
> 
> How can I cast 'd' back to TimeStamp?
> 
> Thanks.
> 
> 

-- 
CREATE DOMAIN NEW_COMPANY AS CHAR(8) DEFAULT 'CODEGEAR' CHECK (VALUE <> 
'BORLAND') NOT NULL;
Technical Details
Message-ID: <460d52bf$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <460cf6d2$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,e403051073053b92
X-Google-Attributes: gid114a0e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 30 Mar 2007 11:11:11 -0700
From: "Quinn Wildman (CodeGear Developer Support)" <qwildman@nospam.codegear.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: borland.public.interbase.sql
Subject: Re: Date/Time manipulation
References: <460cf6d2$1@newsgroups.borland.com>
In-Reply-To: <460cf6d2$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.143.19.108
Message-ID: <460d52bf$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1175278271 10.143.19.108 (30 Mar 2007 11:11:11 -0800)
Lines: 26
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail